1- name : Test Nested Action Wrapper
1+ name : Test Action Wrapper
22
33on :
44 push :
77 pull_request :
88 branches :
99 - main
10+ workflow_dispatch :
1011
1112jobs :
12- test :
13+ test-basic :
1314 runs-on : ubuntu-latest
1415 steps :
1516 - name : Checkout repository
@@ -23,17 +24,56 @@ jobs:
2324 - name : Install dependencies
2425 run : npm ci
2526
26- - name : Run nested action with wrapper (using time)
27+ - name : Run basic hello-world test
2728 uses : ./
29+ id : hello-test
2830 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
3246
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
3360
34- - name : Run nested action with wrapper (using time)
61+ - name : Run input forwarding test
3562 uses : ./
63+ id : input-test
3664 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