-
Notifications
You must be signed in to change notification settings - Fork 0
205 lines (166 loc) · 5.1 KB
/
e2e.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
name: E2E
on:
pull_request:
types:
- opened
- reopened
- synchronize
jobs:
e2e-default:
runs-on: ubuntu-20.04
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Test Run
id: test-run
uses: ./
with:
tag_name: v1.0.0
- name: Assert exists
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.exists }}
expected: "true"
- name: Assert tag name
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.tag_name }}
expected: "v1.0.0"
- name: Assert tag sha
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.tag_sha }}
expected: "c039c53e2ffb5bb54ebdb13189b4c23e7cba15e2"
- name: Assert tag type
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.tag_type }}
expected: "commit"
- name: Assert commit sha
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.commit_sha }}
expected: "c039c53e2ffb5bb54ebdb13189b4c23e7cba15e2"
- name: Assert tag message
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.tag_message }}
expected: "feat: initial commit (#1)\n\n* feat: init from template\r\n\r\n* feat: initial"
- name: Assert verified
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.verified }}
expected: "true"
e2e-unverified-commit-type:
runs-on: ubuntu-20.04
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Test Run
id: test-run
uses: ./
with:
tag_name: unverified_tag
- name: Assert exists
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.exists }}
expected: "true"
- name: Assert tag name
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.tag_name }}
expected: "unverified_tag"
- name: Assert tag sha
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.tag_sha }}
expected: "518c2e81cd748430d589f760efa3b0847d1e1c3d"
- name: Assert tag type
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.tag_type }}
expected: "commit"
- name: Assert commit sha
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.commit_sha }}
expected: "518c2e81cd748430d589f760efa3b0847d1e1c3d"
- name: Assert tag message
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.tag_message }}
expected: "unverified_commit"
- name: Assert verified
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.verified }}
expected: "false"
e2e-not-exists:
runs-on: ubuntu-20.04
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Test Run
id: test-run
uses: ./
with:
tag_name: definitely-not-a-tag
- name: Assert exists
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.exists }}
expected: "false"
- name: Assert tag name
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.tag_name }}
expected: ""
- name: Assert tag sha
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.tag_sha }}
expected: ""
- name: Assert tag type
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.tag_type }}
expected: ""
- name: Assert commit sha
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.commit_sha }}
expected: ""
- name: Assert tag message
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.tag_message }}
expected: ""
- name: Assert verified
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.verified }}
expected: ""
e2e-no-partial-match:
runs-on: ubuntu-20.04
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Test Run
id: test-run
uses: ./
with:
tag_name: v
- name: Assert exists
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.exists }}
expected: "false"