switch esme client class to use class attributes #485
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
name: Continuous integration | |
on: | |
push: | |
branches: ["*"] | |
tags: ["v*"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
rabbitmq: | |
image: rabbitmq:3 | |
ports: | |
- 5672:5672 | |
strategy: | |
matrix: | |
python-version: ["3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: abatilo/actions-poetry@v2.0.0 | |
with: | |
poetry-version: "1.4.2" | |
- name: Install dependancies | |
run: | | |
poetry install | |
- name: Lint | |
run: | | |
poetry run ruff format --check | |
poetry run ruff check | |
poetry run mypy --install-types --non-interactive | |
- name: Test | |
run: poetry run pytest | |
- name: Build docs | |
run: poetry run sphinx-build -b html docs docs/_build/html | |
docker-image: | |
needs: [test] | |
if: ${{ github.event_name != 'pull_request' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: docker/setup-buildx-action@v2 | |
- uses: docker/metadata-action@v4 | |
id: meta | |
with: | |
images: | | |
ghcr.io/${{ github.repository }} | |
tags: | | |
type=semver,pattern={{version}} | |
type=sha,prefix={{branch}}-,enable=${{ github.ref_type != 'tag' }} | |
- uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |