-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from lsst-sqre/tickets/DM-42875
DM-42875: Adopt faststream for Kafka producer
- Loading branch information
Showing
44 changed files
with
954 additions
and
1,036 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,53 +16,62 @@ name: CI | |
- "u/**" | ||
tags: | ||
- "*" | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
lint: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
python-version: "3.12" | ||
|
||
- name: Run pre-commit | ||
uses: pre-commit/[email protected] | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
strategy: | ||
matrix: | ||
python: | ||
- "3.11" | ||
- "3.12" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install nox | ||
run: | | ||
pip install --upgrade pip | ||
pip install --upgrade nox | ||
- name: Start Kafka | ||
run: docker compose -f kafka-compose.yaml up -d | ||
|
||
- name: Run nox | ||
run: "nox -s typing test" | ||
|
||
- name: Stop Kafka | ||
run: docker compose -f kafka-compose.yaml down | ||
|
||
docs: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
# Ensure the documentation gets the right version. | ||
fetch-depth: 0 | ||
|
@@ -74,7 +83,7 @@ jobs: | |
run: sudo apt install -y graphviz | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
|
||
|
@@ -117,7 +126,7 @@ jobs: | |
|| startsWith(github.head_ref, 'tickets/') | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # full history for setuptools_scm | ||
|
||
|
@@ -129,20 +138,39 @@ jobs: | |
|
||
- run: echo Pushed ghcr.io/${{ github.repository }}/${{ steps.build.outputs.tag }} | ||
|
||
pypi: | ||
test-package: | ||
name: Test PyPI package build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # full history for setuptools_scm | ||
|
||
- name: Build and publish | ||
uses: lsst-sqre/build-and-publish-to-pypi@v2 | ||
with: | ||
python-version: "3.12" | ||
upload: "false" | ||
working-directory: "client" | ||
|
||
pypi-publish: | ||
name: Upload release to PyPI | ||
runs-on: ubuntu-latest | ||
needs: [lint, test, docs] | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/rubin-squarebot | ||
permissions: | ||
id-token: write | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # full history for setuptools_scm | ||
|
||
- name: Build and publish | ||
uses: lsst-sqre/build-and-publish-to-pypi@v1 | ||
uses: lsst-sqre/build-and-publish-to-pypi@v2 | ||
with: | ||
pypi-token: ${{ secrets.PYPI_SQRE_ADMIN }} | ||
python-version: "3.11" | ||
upload: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }} | ||
working-directory: "./client" | ||
python-version: "3.12" | ||
working-directory: "client" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,14 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
rev: v4.5.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: check-yaml | ||
- id: check-toml | ||
|
||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.12.0 | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.2.1 | ||
hooks: | ||
- id: isort | ||
additional_dependencies: [toml] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.3.0 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.0.0 | ||
hooks: | ||
- id: flake8 | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
- id: ruff-format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.