-
Notifications
You must be signed in to change notification settings - Fork 39
87 lines (84 loc) · 2.51 KB
/
main.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
79
80
81
82
83
84
85
86
87
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python application
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
linux:
env:
PYTHONFAULTHANDLER: "true"
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: false
# activate-environment: crash-model
# environment-file: conda-linux-64.lock
channels: conda-forge, defaults
channel-priority: strict
- name: Run linux tests
run: |
set -eo pipefail
conda env create --name crash-model -f requirements.txt
conda activate crash-model
cd src
py.test --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./src/coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: true
mac:
env:
PYTHONFAULTHANDLER: "true"
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
#activate-environment: crash-model
#environment-file: conda-osx-64.lock
#environment-file: environment_mac.yml
channels: conda-forge, defaults
channel-priority: strict
- name: Run mac tests
run: |
set -eo pipefail
. /usr/local/miniconda/etc/profile.d/conda.sh
sudo chown -R $USER $CONDA
conda env create --name crash-model -f requirements.txt
conda activate crash-model
cd src
pytest
# unclear that we need to test on windows
# windows:
# env:
# PYTHONFAULTHANDLER: "true"
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v2
# - uses: conda-incubator/setup-miniconda@v2
# with:
# auto-update-conda: true
# #activate-environment: crash-model
# #environment-file: conda-win-64.lock
# channels: conda-forge, defaults
# channel-priority: strict
# - name: Run windows tests
# shell: bash -l {0}
# run: |
# set -eo pipefail
# conda env create --name crash-model -f requirements.txt
# cd src
# py.test