This repository has been archived by the owner on Nov 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (50 loc) · 1.58 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
name: Run MATLAB tests
on: [push]
jobs:
matlab-tests:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v1
- name: Run script
uses: matlab-actions/run-command@v1
with:
command: run_tests
- name: Upload code coverage
uses: codecov/codecov-action@v3
- name: Upload test timings
uses: actions/upload-artifact@v3
with:
name: benchmarks
path: artifacts
update-benchmarks:
name: Update test benchmarks
needs: [matlab-tests]
runs-on: ubuntu-latest
if: success() && github.ref == 'refs/heads/main'
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Download test times
uses: actions/download-artifact@v3
with:
name: benchmarks
path: artifacts
- name: Parse test time file
run: |
python -m pip install -r benchmarks/requirements.txt
python benchmarks/parse_performance.py
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Toolbox benchmarks
tool: customSmallerIsBetter
output-file-path: benchmarks.json
# Access token to deploy GitHub Pages branch
github-token: ${{ secrets.GITHUB_TOKEN }}
benchmark-data-dir-path: benchmarks
# Push and deploy GitHub pages branch automatically
auto-push: true