-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (40 loc) · 1.2 KB
/
tests.yaml
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
name: tests
on: [push, pull_request]
jobs:
code-quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- id: file_changes
uses: trilom/[email protected]
with:
output: " "
- name: List changed files
run: echo '${{ steps.file_changes.outputs.files}}'
- uses: pre-commit/[email protected]
with:
extra_args: --files ${{ steps.file_changes.outputs.files}}
- name: Check for missing init files
run: build_tools/fail_on_missing_init_files.sh
shell: bash
pytests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[dev]
python -m pip install pytest
- name: Test with pytest
run: |
pytest --cov --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}