-
Notifications
You must be signed in to change notification settings - Fork 18
54 lines (46 loc) · 1.3 KB
/
codecov.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
name: Gather coverage report and upload to codecov
on:
push:
branches:
- main
release:
types:
- prereleased
- published
workflow_dispatch:
defaults:
run:
shell: bash -l {0}
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Check out diffpy.pdffit2
uses: actions/checkout@v4
- name: Initialize miniconda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
auto-update-conda: true
environment-file: environment.yml
auto-activate-base: false
- name: Conda config
run: >-
conda config --set always_yes yes
--set changeps1 no
- name: Install diffpy.pdffit2 and requirements
run: |
conda install --file requirements/run.txt
conda install --file requirements/test.txt
conda install --file requirements/build.txt
python -m pip install -r requirements/pip.txt
python -m pip install -e . --no-deps
- name: Validate diffpy.pdffit2
run: |
coverage run -m pytest -vv -s
coverage report -m
codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}