1
- name : Test Nested Action Wrapper
1
+ name : Test Action Wrapper
2
2
3
3
on :
4
4
push :
7
7
pull_request :
8
8
branches :
9
9
- main
10
+ workflow_dispatch :
10
11
11
12
jobs :
12
- test :
13
+ test-basic :
13
14
runs-on : ubuntu-latest
14
15
steps :
15
16
- name : Checkout repository
@@ -23,17 +24,56 @@ jobs:
23
24
- name : Install dependencies
24
25
run : npm ci
25
26
26
- - name : Run nested action with wrapper (using time)
27
+ - name : Run basic hello-world test
27
28
uses : ./
29
+ id : hello-test
28
30
with :
29
- action-ref : " actions/hello-world-javascript@v1"
30
- extra-args : " who-to-greet time"
31
- wrapper-command : " time"
31
+ action-ref :
" actions/[email protected] "
32
+ who-to-greet : " Hello World"
33
+ step : " hello-world"
34
+ attestations : " command environment"
35
+ outfile : " ./hello-world.json"
36
+
37
+ - name : Verify hello-world action ran
38
+ run : |
39
+ if [[ -f "./hello-world.json" ]]; then
40
+ echo "Hello world attestation created successfully"
41
+ jq . "./hello-world.json" | head -n 20
42
+ else
43
+ echo "Hello world attestation file not found!"
44
+ exit 1
45
+ fi
32
46
47
+ test-input-forwarding :
48
+ runs-on : ubuntu-latest
49
+ steps :
50
+ - name : Checkout repository
51
+ uses : actions/checkout@v3
52
+
53
+ - name : Setup Node.js
54
+ uses : actions/setup-node@v3
55
+ with :
56
+ node-version : ' 16'
57
+
58
+ - name : Install dependencies
59
+ run : npm ci
33
60
34
- - name : Run nested action with wrapper (using time)
61
+ - name : Run input forwarding test
35
62
uses : ./
63
+ id : input-test
36
64
with :
37
- action-ref : " actions/hello-world-javascript@v1"
38
- wrapper-command : " time"
39
- who-to-greet : " Mona the Octocat"
65
+ action-ref :
" actions/[email protected] "
66
+ who-to-greet : " Input Forwarding"
67
+ step : " input-forwarding"
68
+ attestations : " command environment"
69
+ outfile : " ./input-forward.json"
70
+
71
+ - name : Verify input forwarding
72
+ run : |
73
+ if [[ -f "./input-forward.json" ]]; then
74
+ echo "Input forwarding attestation created successfully"
75
+ jq . "./input-forward.json" | head -n 20
76
+ else
77
+ echo "Input forwarding attestation file not found!"
78
+ exit 1
79
+ fi
0 commit comments