Simpilify docker-compose.yml for tests #32
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: Check | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: 0 12 1 * * | |
concurrency: | |
group: check-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Run tests with Python ${{ matrix.python-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ '3.10', '3.11', '3.12' ] | |
include: | |
- python-version: '3.10' | |
tox-env: tests-py310 | |
- python-version: '3.11' | |
tox-env: tests-py311 | |
- python-version: '3.12' | |
tox-env: tests-py312 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install tox | |
run: python -m pip install tox tox-uv | |
- name: Setup environment | |
run: tox -vv --notest -e ${{ matrix.tox-env }},coverage | |
- name: Run tests | |
run: tox --skip-pkg-install -e ${{ matrix.tox-env }},coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
files: .tox/coverage.xml | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
lint: | |
name: Run linters | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install tox | |
run: python -m pip install tox tox-uv | |
- name: Setup environment | |
run: tox -vv --notest -e lint | |
- name: Run linters | |
run: tox --skip-pkg-install -e lint |