Skip to content

Commit 0f0d119

Browse files
authored
Test using actions itself instead of python source (#12)
* Test using actions itself instead of python source * Fix path * Split@v2 can use split:v2 docker tag
1 parent 6c7402c commit 0f0d119

File tree

1 file changed

+30
-10
lines changed

1 file changed

+30
-10
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,36 @@ jobs:
2929
- name: Checkout
3030
uses: actions/checkout@v2
3131

32-
- name: Run split action
33-
id: split
34-
run: |
35-
python3 main.py
36-
env:
37-
INPUT_MSG: '/release split v1'
32+
- name: Test local version
33+
id: local
34+
uses: ./
35+
with:
36+
msg: 'repo/name'
37+
separator: '/'
38+
39+
- name: Test v2 version
40+
id: v2
41+
uses: jungwinter/split@v2
42+
with:
43+
msg: 'repo/name'
44+
separator: '/'
45+
46+
- name: Test v1 version
47+
id: v1
48+
uses: jungwinter/split@v1
49+
with:
50+
msg: 'repo/name'
51+
# v1 has misspelled sep'e'rator
52+
seperator: '/'
3853

3954
- name: Test results
4055
run: |
41-
[[ "${{ steps.split.outputs._0 }}" == "/release" ]] || exit 1
42-
[[ "${{ steps.split.outputs._1 }}" == "split" ]] || exit 1
43-
[[ "${{ steps.split.outputs._2 }}" == "v1" ]] || exit 1
44-
[[ "${{ steps.split.outputs.length }}" == "3" ]] || exit 1
56+
[[ "${{ steps.local.outputs._0 }}" == "repo" ]] || exit 1
57+
[[ "${{ steps.local.outputs._1 }}" == "name" ]] || exit 1
58+
[[ "${{ steps.local.outputs.length }}" == "2" ]] || exit 1
59+
[[ "${{ steps.v2.outputs._0 }}" == "repo" ]] || exit 1
60+
[[ "${{ steps.v2.outputs._1 }}" == "name" ]] || exit 1
61+
[[ "${{ steps.v2.outputs.length }}" == "2" ]] || exit 1
62+
[[ "${{ steps.v1.outputs._0 }}" == "repo" ]] || exit 1
63+
[[ "${{ steps.v1.outputs._1 }}" == "name" ]] || exit 1
64+
[[ "${{ steps.v1.outputs.length }}" == "2" ]] || exit 1

0 commit comments

Comments
 (0)