-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (50 loc) · 1.17 KB
/
test-match-against-regexp.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
---
name: Test match-against-regexp action
on:
pull_request:
branches:
- main
push:
branches:
- main
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
main:
name: Test match-against-regexp action
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Check with valid values
uses: ./match-against-regexp
with:
values: |-
123
abd123
lichi
regexps: |-
[0-9]+
[a-z0-9]+
apple|banana|lichi
- name: Check with invalid values
id: should-fail
continue-on-error: true
uses: ./match-against-regexp
with:
values: |-
aaa
abd123
tomato
regexps: |-
[0-9]+
[a-z0-9]+
apple|banana|lichi
- name: Check failure
shell: bash
run: |
if [[ "${{ steps.should-fail.outcome }}" == "success" ]]; then
echo "!!! Failure test failed. Something fishy is going on here"
exit 1
fi