-
Notifications
You must be signed in to change notification settings - Fork 11
34 lines (33 loc) · 845 Bytes
/
test.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
on: [push]
jobs:
test:
runs-on: ubuntu-latest
name: Test
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Test
uses: ./
id: test
with:
string: 'aasdfa/v1.0.1'
pattern: '[\w\d/]*v(\d+(?:\.\d+)*)'
replace-with: '$1'
- name: Check equality
run: '[[ "${{ steps.test.outputs.replaced }}" == "1.0.1" ]]'
test-whitespace:
runs-on: ubuntu-latest
name: Test whitespaces
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Test
uses: ./
id: test
with:
string: '_replace_underscores_'
pattern: '_'
replace-with: ' '
flags: 'g'
- name: Check equality
run: '[[ "${{ steps.test.outputs.replaced }}" == " replace underscores " ]]'