generated from actions/hello-world-docker-action
-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (85 loc) · 2.64 KB
/
ci-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
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
name: Continuous Integration - Test Action
on:
pull_request:
branches:
- main
push:
branches:
- main
permissions:
contents: read
jobs:
test-action:
name: Action Test Output
runs-on: ubuntu-latest
outputs:
comment-line: ${{ steps.action.outputs.test-action_comment-line }}
to-dont-read: ${{ steps.action.outputs.test-action_to-dont-read }}
multiline: ${{ steps.action.outputs.test-action_multiline }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Test Action
id: action
uses: ./
with:
file-path: .github/workflows-tests/yq-test-action.yml
filtering-keys: |
test-action_comment-line
test-action_to-rename
test-action_multiline
renaming-outputs: |
test-action_to-rename=test-action_renamed
test-action-output-comment-line:
name: Action Test Output - Comment Line
needs: test-action
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Test Output Comment Line
id: test-output-comment-line
run: |
test_name="Test Output Comment Line"
expected="./app ="
.github/scripts/test-action-output.sh \
"$test_name" \
"$expected" \
"${{ needs.test-action.outputs.comment-line }}"
test-action-output-dont-read:
name: Action Test Output - Don't Read
needs: test-action
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Test Output Don't Read
id: test-output-dont-read
run: |
test_name="Test Output Don't Read"
expected=''
.github/scripts/test-action-output.sh \
"$test_name" \
"$expected" \
"${{ needs.test-action.outputs.to-dont-read }}"
test-action-output-multiline:
name: Action Test Output - Multiline
needs: test-action
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Test Output Multiline
id: test-output-multiline
run: |
test_name="Test Output Multiline"
expected="### Heading\n\n* Bullet C:\\\n* Driver D:\\\\\n* Points"
expected=$(printf '%s' "${expected}" | sed -e 's/\\n/\n/g')
.github/scripts/test-action-output.sh \
"$test_name" \
"$expected" \
"${{ needs.test-action.outputs.multiline }}"