-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (43 loc) · 1.14 KB
/
ci.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
44
name: Run Python Tests
on:
push:
branches:
- main
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
steps:
- uses: actions/checkout@v2
- name: Install Python 3
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_dev.txt
- name: Install rusty_results
run: pip install -e .
- name: Run tests with pytest
run: pytest
- name: Run mypy on result.py
run: mypy rusty_results/prelude.py
- name: Build coverage file
run: pytest --cache-clear --cov=rusty_results --cov-report=xml:pytest-coverage.xml ./rusty_results
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./pytest-coverage.xml
fail_ci_if_error: true