-
-
Notifications
You must be signed in to change notification settings - Fork 65
36 lines (33 loc) · 1000 Bytes
/
tests.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
name: Tests
on:
pull_request:
env:
POETRY_VERSION: 1.8.2
jobs:
tests:
name: Run Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python: ['3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-poetry-action
with:
poetry-version: ${{ env.POETRY_VERSION }}
python-version: ${{ matrix.python }}
without: build
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-python-${{ matrix.python }}-${{ hashFiles('poetry.lock', '.pre-commit-config.yaml') }}-${{ runner.os }}
- name: Run linting
run: poetry run pre-commit run -a
- name: Run tests
run: poetry run pytest -v -m "not tgtg_api" --cov=tgtg_scanner --cov-report=xml
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true