-
Notifications
You must be signed in to change notification settings - Fork 11
71 lines (55 loc) · 2.16 KB
/
main.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
name: GitHub Actions for PsPM
on: [push]
jobs:
PsPM-test:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Add test data
uses: actions/checkout@v3
with:
repository: bachlab/PsPM-data
token: ${{ secrets.PSPM_PAT }}
path: ImportTestData
- name: Setup MATLAB
uses: matlab-actions/setup-matlab@v1.2.4
- name: Run script
id: pspm_test_main
uses: matlab-actions/run-command@v1
with:
command: addpath('test'), addpath('src'), pspm_test_github_actions
- name: Check status
id: check_status
uses: andstor/file-existence-action@v2
with:
files: "success.txt"
- name: Return running success
if: ${{ steps.check_status.outputs.files_exists == 'true' }}
run: exit 0
- name: Return running failure
if: ${{ steps.check_status.outputs.files_exists != 'true' }}
run: exit 1
# Optional commands
# - run: echo "This job's status is ${{ job.status }}."
# - name: List files in the repository
# run: ls ${{ github.workspace }}
# - name: Display structure of downloaded files
# run: ls -R
# - run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
# - run: echo "This job is now running on a ${{ runner.os }} server hosted by GitHub!"
# - run: echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
# Show a value
# - run: echo "This running status is ${{ steps.check_status.outputs.files_exists }}."
# Set a variable
# - name: Set running status variable
# id: status_var
# run: echo "status_output=success" >> $GITHUB_OUTPUT
# - uses: pCYSl5EDgo/cat@master
# id: result_list
# with:
# path: "success.txt"
# - name: Return running results
# run: echo $TEXT
# env:
# TEXT: ${{ steps.result_list.outputs.text }}