-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (42 loc) · 1.28 KB
/
integration-tests.yaml
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
---
name: Integration Tests
on:
pull_request:
paths:
- "action.yaml"
- "gha_extract_shell_scripts.py"
- ".github/workflows/integration-tests.yaml"
jobs:
test:
name: Test
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: ./
id: gha-extract-shell-scripts
- name: Test extracted
run: |
set -x
output_file="workflow_scripts/${{ env.workflow_file }}/job=Test/step=Test_extracted.sh"
if [[ ! -f "$output_file" ]]; then
find .
exit 1
fi
cat "$output_file"
diff --color=always <(sed 's/^(expected)=.*$/\1='\''\1'\''/' "$output_file") <(echo "$expected")
env:
expected: |
#!/usr/bin/env bash
set -e
expected='$expected'
workflow_file='integration-tests.yaml'
# ---
output_file="workflow_scripts/:env.workflow_file:/job=Test/step=Test_extracted.sh"
if [[ ! -f "$output_file" ]]; then
find .
exit 1
fi
diff --color=always <(sed 's/^(expected)=.*$/\1='\''\1'\''/' "$output_file") <(echo "$expected")
workflow_file: integration-tests.yaml