-
Notifications
You must be signed in to change notification settings - Fork 4
78 lines (68 loc) · 2.26 KB
/
run_tests.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
73
74
75
76
77
78
name: Run the tests
on: [pull_request]
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-20.04
label: linux-64
prefix: /usr/share/miniconda3/envs/bionc
- os: macos-latest
label: osx-64
prefix: /Users/runner/miniconda3/envs/bionc
- os: windows-latest
label: win-64
prefix: C:\Miniconda3\envs\bionc
name: ${{ matrix.label }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@master
- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
activate-environment: bionc
environment-file: environment.yml
- name: Print mamba info
run: |
mamba info
mamba list
- name: Install extra dependencies
run: mamba install pytest-cov pytest codecov coverage -cconda-forge
- name: Run the actual tests on LINUX
run: |
sudo apt-get install xvfb
xvfb-run --server-args="-screen 0 1024x768x24" pytest -v --color=yes --cov-report term-missing --cov=bionc tests
if: matrix.label == 'linux-64'
- name: Run the actual tests
run: pytest -v --color=yes --cov-report=xml --cov=bionc tests
if: matrix.label == 'osx-64'
- name: Show current dir content with new .coverage file
run: pwd; ls -a
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
flags: unittests
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
if: matrix.label == 'osx-64'
- name: Test installed version of bioviz on LINUX
run: |
python setup.py install
cd
xvfb-run --server-args="-screen 0 1024x768x24" python -c "import bionc"
if: matrix.label == 'linux-64'
- name: Test installed version of bionc on WINDOWS and MAC
run: |
python setup.py install
cd
python -c "import bionc"
if: matrix.label != 'linux-64'