-
Notifications
You must be signed in to change notification settings - Fork 2
146 lines (124 loc) · 3.7 KB
/
testing.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: Unit Testing
on:
push:
branches:
- 'master'
jobs:
# Linux
linux-testing:
name: Linux Unit Testing
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
permissions:
checks: write
pull-requests: write
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Create Environment from .yml
uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
activate-environment: pzero-testing
environment-file: envs/std-environment.yml
# python-version: 3.8.16
python-version: 3.8
auto-activate-base: false
- name: Check Conda Dependencies
run: |
conda info
conda list
- name: Test with pytest
run: |
conda install pytest-html
pytest --html=ubu-test-report.html tests/
- name: Upload pytest test results
uses: actions/upload-artifact@v3
with:
name: pytest-results-ubuntu
path: ubu-test-report.html
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
# Windows
windows-testing:
name: Windows Unit Testing
runs-on: windows-latest
defaults:
run:
shell: bash -el {0}
permissions:
checks: write
pull-requests: write
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Create Environment from .yml
uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
activate-environment: pzero-test
environment-file: envs/std-environment.yml
# python-version: 3.8.16
python-version: 3.8
auto-activate-base: false
- name: Check Conda Dependencies
run: |
conda info
conda list
- name: Test with pytest
run: |
conda install pytest-html
pytest --html=win-test-report.html tests/
- name: Upload pytest test results
uses: actions/upload-artifact@v3
with:
name: pytest-results-win
path: win-test-report.html
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
# MacOS
macOS-testing:
name: Mac OS Unit Testing
runs-on: macos-latest
defaults:
run:
shell: bash -el {0}
permissions:
checks: write
pull-requests: write
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Create Environment from .yml
uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
activate-environment: pzero-test
# environment-file: envs/macos-environment.yml
environment-file: envs/std-environment.yml
# python-version: 3.8.16
python-version: 3.8
auto-activate-base: false
- name: Check Conda Dependencies
run: |
conda info
conda list
- name: Test with pytest
run: |
conda install pytest-html
pytest --html=macos-test-report.html tests/
- name: Upload pytest test results
uses: actions/upload-artifact@v3
with:
name: pytest-results-macos
path: macos-test-report.html
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}