Skip to content

Add Github build badge to README.md #4

Add Github build badge to README.md

Add Github build badge to README.md #4

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
test:
strategy:
fail-fast: false
matrix:
python-version: [ "3.10", "3.11", "3.12" ]
poetry-version: [ "1.8.3" ]
os: [ ubuntu-22.04 ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Poetry ${{ matrix.poetry-version }}
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Set up virtual environment
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v3
name: Define a cache for the virtual environment based on the dependencies lock file
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: poetry install
- name: Check code style
run: poetry run black --check .
- name: Check imports order
run: poetry run isort --check .
- name: Check types
run: poetry run mypy .
- name: Run unit tests
run: poetry run pytest .