-
Notifications
You must be signed in to change notification settings - Fork 35
50 lines (48 loc) · 1.5 KB
/
test_suite.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
42
43
44
45
46
47
48
49
50
name: Tests
# Test on all pushes, except when the push is literally just a tag (because we
# tag automatically via CI, and therefore there's no extra code in that push).
# Also, only test on pull requests into master/dev.
on:
push:
pull_request:
branches:
- 'main'
jobs:
tests:
if: "!contains(github.event.pull_request.labels.*.name, 'auto-pr')"
env:
ENV_NAME: tests
PYTHON: ${{ matrix.python-version }}
OS: ${{ matrix.os }}
name: Testing
# needs: [linter]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.9, "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@master
with:
fetch-depth: 1
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: fortran-lang/setup-fortran@v1
id: setup-fortran
with:
compiler: gcc
version: 13
- name: Install
run: pip install .[dev]
- name: Run Tests
run: |
python -m pytest --cov=hmf --cov-config=.coveragerc --cov-report xml:./coverage.xml --durations=25
- uses: codecov/codecov-action@v5
if: matrix.os == 'ubuntu-latest' && success() && !contains(github.event.pull_request.labels.*.name, 'auto-pr')
with:
file: ./coverage.xml # optional
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}