generated from threeal/action-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (85 loc) · 2.38 KB
/
test.yaml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Test
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
jobs:
test-action:
name: Test Action
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-14, windows-2022]
steps:
- name: Checkout Solutions
uses: actions/checkout@v4.2.2
with:
repository: threeal/leetspace-starter
- name: Checkout Action
uses: actions/checkout@v4.2.2
with:
path: leettest-action
sparse-checkout: |
action.yml
dist
sparse-checkout-cone-mode: false
- name: Test Solutions
uses: ./leettest-action
test-action-failure:
name: Test Action Failure
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-14, windows-2022]
steps:
- name: Checkout Solutions
uses: actions/checkout@v4.2.2
with:
repository: threeal/leetspace-starter
- name: Modify Solutions
run: echo "something" >> problems/2235/solution.cpp
- name: Checkout Action
uses: actions/checkout@v4.2.2
with:
path: leettest-action
sparse-checkout: |
action.yml
dist
sparse-checkout-cone-mode: false
- name: Test Solutions
id: test-solutions
continue-on-error: true
uses: ./leettest-action
- name: Test Solutions Should Be Failing
run: exit ${{ steps.test-solutions.outcome == 'success' && '1' || '0' }}
test-action-with-files-specified:
name: Test Action With Files Specified
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-14, windows-2022]
steps:
- name: Checkout Solutions
uses: actions/checkout@v4.2.2
with:
repository: threeal/leetspace-starter
- name: Modify Solutions
run: |
cp -r problems/2235 problems/2236
echo "something" >> problems/2235/solution.cpp
- name: Checkout Action
uses: actions/checkout@v4.2.2
with:
path: leettest-action
sparse-checkout: |
action.yml
dist
sparse-checkout-cone-mode: false
- name: Test Solutions
uses: ./leettest-action
with:
files: problems/2236/solution.cpp