-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgithubrunner_pullrequest.yml
42 lines (37 loc) · 1.25 KB
/
githubrunner_pullrequest.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
name: PullRequest GitHub Runner - Diff to Ancestor, Publish and attach Report, and Run Project Tests
# Controls when the workflow will run
on:
# Triggers the workflow on pull request events but only for the main branch
pull_request:
branches: [ main ]
jobs:
my-job:
name: Diff to Ancestor, Publish and attach Report, and Run Project Tests
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v2
- name: Start display server
run: |
sudo apt-get install -y xvfb
Xvfb :99 &
export DISPLAY=:99
echo "DISPLAY=:99" >> $GITHUB_ENV
- name: Compare Models to Ancestors
uses: matlab-actions/run-command@v1
with:
command: branch ="${{ github.head_ref }}", diffGitHub_pullrequest(branch)
- name: Upload Comparison Reports
uses: actions/upload-artifact@v4
with:
name: diffreports
path: ${{ github.workspace }}/*.html
- name: Run All Project Tests
uses: matlab-actions/run-command@v2
with:
command: runtests
# Copyright 2022-2024 The MathWorks, Inc.