Skip to content

fix(book): Fix minor typos (#616) #648

fix(book): Fix minor typos (#616)

fix(book): Fix minor typos (#616) #648

name: "backend-services"
on: push
defaults:
run:
working-directory: backend-services
jobs:
build:
name: "container build"
runs-on: ubuntu-latest
steps:
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository_owner }}/backend-services
- uses: docker/setup-buildx-action@v2
- name: "Build container: backend-services"
uses: docker/build-push-action@v3
with:
context: "https://github.com/${{ github.repository }}.git#${{ github.sha }}:backend-services"
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
test:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --with=dev,test --no-interaction --no-root --sync
- name: Install project
run: poetry install --with=dev,test --no-interaction --sync
- name: Run tox
# Run tox using the version of Python in `PATH`
run: poetry run tox -e py
- name: Check (ruff)
run: poetry run ruff src tests
- name: Check (black)
run: poetry run black --check src tests
- name: Check (isort)
run: poetry run isort --check src tests
- name: Check (bandit)
run: poetry run bandit -r src