forked from tsdev/spinw
-
Notifications
You must be signed in to change notification settings - Fork 15
58 lines (56 loc) · 1.67 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
name: SpinW Tests
on:
push:
branches: [master]
pull_request:
branches: [master, development]
types: [opened, reopened, synchronize]
workflow_dispatch:
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
matlab_version: [latest]
include:
- os: ubuntu-latest
matlab_version: R2020a
- os: macos-latest
INSTALL_DEPS: brew install llvm libomp
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Check out SpinW
uses: actions/checkout@v3
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v1 # v1.1.0 required for Windows/MacOS support
with:
release: ${{ matrix.matlab_version }}
- name: Run tests
uses: matlab-actions/run-command@v1
with:
command: "run run_tests.m"
- uses: codecov/codecov-action@v3
if: ${{ always() && matrix.os == 'ubuntu-latest' && matrix.matlab_version == 'latest' }}
with:
files: coverage*.xml
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: Unit test results ${{ matrix.os }}
path: junit_report*.xml
publish-test-results:
needs: test
runs-on: ubuntu-latest
if: success() || failure()
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
junit_files: artifacts/**/junit_report*.xml