-
Notifications
You must be signed in to change notification settings - Fork 15
72 lines (70 loc) · 1.96 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Codecov
on: pull_request
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.9']
steps:
- name: checkout nsrdb
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
path: nsrdb
- name: checkout mlclouds
uses: actions/checkout@v2
with:
repository: nrel/mlclouds
ssh-key: ${{ secrets.SSH_KEY }}
path: mlclouds
- name: checkout rest2
uses: actions/checkout@v2
with:
repository: nrel/rest2
ssh-key: ${{ secrets.SSH_KEY }}
path: rest2
- name: Set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Install rest2 dependencies
working-directory: ./rest2
shell: bash -l {0}
run: |
conda install pip
pip install -e .
- name: Install nsrdb dependencies
working-directory: ./nsrdb
shell: bash -l {0}
run: |
conda install hdf4
conda install -c conda-forge pyhdf
pip install -e .
- name: Install mlclouds dependencies
working-directory: ./mlclouds
shell: bash -l {0}
run: |
pip install -e .
- name: Install codecov dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
python -m pip install pytest-cov
python -m pip install .
- name: Generate coverage report
run: |
python -m pytest --cov=./ --cov-report=xml:coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false
verbose: true