-
Notifications
You must be signed in to change notification settings - Fork 16
64 lines (64 loc) · 1.76 KB
/
pytest_and_coveralls.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
name: pytests
on:
push:
paths-ignore:
- "CHANGELOG.rst"
- "docs/**"
pull_request:
paths-ignore:
- "CHANGELOG.rst"
- "docs/**"
jobs:
pytest_coveralls:
name: run PyTest
runs-on: ubuntu-20.04
steps:
# Checkout BALSAMIC
- name: Git checkout
id: git_checkout
uses: actions/checkout@v3
# Get branch name
- name: Get branch name
id: get_branch_name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})"
# Conda env create
- name: setup conda
id: setup_conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: balsamic
environment-file: BALSAMIC/conda/balsamic.yaml
# Install BALSAMIC
- name: Install BALSAMIC
id: install_balsamic
shell: bash -l {0}
run: |
conda activate balsamic
pip install --no-cache-dir .
# Install pytest coveralls dependencies
- name: Install PyTest and Coveralls
id: install_pytest
shell: bash -l {0}
run: |
conda activate balsamic
pip install --no-cache-dir -r requirements-dev.txt
# Run PyTest
- name: Run PyTest
id: pytest
shell: bash -l {0}
run: |
conda activate balsamic
py.test --cov-report=xml --cov=BALSAMIC -rsxv tests/*
env:
SENTIEON_LICENSE: dummy_license
SENTIEON_INSTALL_DIR: dummy_install_dir
# Run Codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
fail_ci_if_error: true
verbose: true