-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (49 loc) · 1.49 KB
/
unittests.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
45
46
47
48
49
50
51
52
name: tests
on:
push:
branches-ignore:
- "*docs*"
jobs:
build:
runs-on: ubuntu-latest
strategy:
# max-parallel: 2
matrix:
python-version: ['3.10', '3.11', '3.12']
fail-fast: false
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }} 🐍
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
chmod +x install.sh
bash -l ./install.sh -n smefit_installation
- name: Lint with pylint
run: |
source /usr/share/miniconda/bin/activate /usr/share/miniconda/envs/smefit_installation
pip install pylint
# Search for actual errors
pylint src/smefit -E
# For warnings instead return always zero
pylint src/smefit --exit-zero
- name: Test with pytest
run: |
# add test packages
source /usr/share/miniconda/bin/activate /usr/share/miniconda/envs/smefit_installation
pip install pytest
pip install pytest-cov
pip install pytest-env
pytest
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v4
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# file: ./coverage.xml
# flags: unittests
# name: codecov-umbrella
# fail_ci_if_error: true