-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (40 loc) · 1.18 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: CI
on: [ push, pull_request, workflow_dispatch ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
name: Continuous Integration
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.4.0
- name: Install dependencies
run: poetry install
- name: Black
run: poetry run black src --check
- name: Flake8
run: poetry run flake8
- name: Mypy
run: poetry run mypy src --check-untyped-defs
- name: Copy test envvars
run: cp .env.test .env
- name: Start docker containers
run: docker-compose up --detach
- name: Tests
run: poetry run pytest --cov=src --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}