Skip to content

Commit 1bc5c2a

Browse files
Restore CI
1 parent 8dc473d commit 1bc5c2a

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11", "3.12"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -e .[test]
28+
29+
- name: Run pre-commit checks
30+
if: matrix.python-version == '3.11'
31+
run: |
32+
pip install pre-commit
33+
pre-commit run --all-files
34+
35+
- name: Run tests with coverage
36+
run: |
37+
pytest --cov=jesterTOV --cov-report=xml --cov-report=term-missing
38+
39+
- name: Upload results to Codecov
40+
uses: codecov/codecov-action@v5
41+
with:
42+
token: ${{ secrets.CODECOV_TOKEN }}
43+
slug: nuclear-multimessenger-astronomy/jester
44+
45+
- name: Upload coverage to Codecov
46+
if: matrix.python-version == '3.11'
47+
uses: codecov/codecov-action@v3
48+
with:
49+
file: ./coverage.xml
50+
flags: unittests
51+
name: codecov-umbrella
52+
fail_ci_if_error: false

0 commit comments

Comments
 (0)