-
-
Notifications
You must be signed in to change notification settings - Fork 73
32 lines (30 loc) · 920 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
name: Tests
on:
pull_request:
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:
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