-
Notifications
You must be signed in to change notification settings - Fork 24
59 lines (48 loc) · 1.39 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: CI
on: [pull_request, push]
jobs:
run-on-conda:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: myenv
mamba-version: "*"
channels: conda-forge, defaults
- name: Create Conda environment
shell: bash -l {0}
run: |
mamba install -c conda-forge fenics-dolfinx
- name: Install local package and dependencies
shell: bash -l {0}
run: |
pip install .[test]
- name: Run tests
shell: bash -l {0}
run: |
pytest test/ --cov festim --cov-report xml --cov-report term
- name: Upload to codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
run-on-docker:
runs-on: ubuntu-latest
container: dolfinx/dolfinx:stable
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install local package and dependencies
run: |
pip install .[test]
- name: Run tests
run: |
python3 -m pytest test/ --cov festim --cov-report xml --cov-report term
- name: Upload to codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml