-
Notifications
You must be signed in to change notification settings - Fork 101
46 lines (41 loc) · 1.48 KB
/
testing-all-oses.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
name: Test MSS
on:
push:
pull_request:
jobs:
Test-MSS:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["macos-12", "macos-14", "ubuntu-latest", "windows-latest"]
order: ["normal", "reverse"]
steps:
- uses: actions/checkout@v4
- name: Build requirements.txt file
run: |
cat localbuild/meta.yaml |
sed -n '/^requirements:/,/^test:/p' |
sed -e "s/.*- //" |
sed -e "s/menuinst.*//" |
sed -e "s/.*://" > requirements.tmp.txt
cat requirements.d/development.txt >> requirements.tmp.txt
sed -e '/^$/d' -e '/^#.*$/d' requirements.tmp.txt > requirements.txt
rm requirements.tmp.txt
cat requirements.txt
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: requirements.txt
environment-name: ci
- name: Run tests
timeout-minutes: 20
run: micromamba run -n ci ${{ (startsWith(matrix.os, 'ubuntu') && 'xvfb-run') || 'env QT_QPA_PLATFORM=offscreen' }}
pytest -v -n 6 --dist loadfile --max-worker-restart 4 --durations=20 --cov=mslib
${{ (matrix.order == 'normal' && ' ') || (matrix.order == 'reverse' && '--reverse') }} tests
- name: Collect coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global --add safe.directory /__w/MSS/MSS
micromamba create -n coveralls coveralls
micromamba run -n coveralls coveralls --service=github