-
Notifications
You must be signed in to change notification settings - Fork 54
34 lines (31 loc) · 979 Bytes
/
codecov-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
name: Codecov CI
on: [push, pull_request]
jobs:
run:
runs-on: ubuntu-latest
env:
OS: ubuntu-latest
PYTHON: "3.9"
steps:
- uses: actions/checkout@v2
# Similar to MetPy install-conda action
- name: Set up conda
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: latest
miniforge-variant: mambaforge
channel-priority: strict
channels: conda-forge
show-channel-urls: true
use-only-tar-bz2: true
- name: Install dependencies and generate report
shell: bash -l {0}
run:
mamba install --quiet --yes --file requirements.txt coverage pytest-cov &&
python -m coverage run -m pytest --cov=./ --cov-report=xml
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
flags: unittests