Skip to content

Commit 626ca16

Browse files
committed
tf
1 parent b527893 commit 626ca16

File tree

1 file changed

+60
-15
lines changed

1 file changed

+60
-15
lines changed

.github/workflows/TestWorkflow.yml

Lines changed: 60 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,76 @@ env:
88
ACTIONS_REPO: asterisk-ci-actions
99
ACTIONS_BRANCH: main-test-native
1010
SCRIPT_DIR: ${{ github.workspace }}/asterisk-ci-actions/scripts
11+
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
12+
RUN_ID: ${{ github.id }}
1113

1214
jobs:
13-
Setup:
15+
Job1:
1416
runs-on: ubuntu-latest
1517
defaults:
1618
run:
1719
shell: bash
1820
steps:
19-
- name: Setup
21+
- name: DumpEnvironment
22+
uses: asterisk/asterisk-ci-actions/DumpEnvironmentAction@main
23+
24+
- name: test
2025
run: |
21-
# Setup
22-
pwd
23-
wget -qO asterisk-ci-actions.tar.gz \
24-
https://github.com/${ACTIONS_OWNER}/${ACTIONS_REPO}/archive/refs/heads/${ACTIONS_BRANCH}.tar.gz
25-
tar -xf asterisk-ci-actions.tar.gz --transform="s/^${ACTIONS_REPO}-${ACTIONS_BRANCH}/asterisk-ci-actions/g"
26-
# jq -r '. | from_entries' ${ACTIONS_REPO}/.github/control/asterisk-gh-test.json
27-
sed -i -r -e "s/^vars_/export vars_/g" ${ACTIONS_REPO}/.github/control/asterisk-gh-test.env
28-
source ${ACTIONS_REPO}/.github/control/asterisk-gh-test.env
29-
for VV in ${!vars_@} ; do
30-
echo "$VV=${!VV}" >> "${GITHUB_ENV}"
31-
done
26+
mkdir logs
27+
step_summary=""
28+
step_summary+="FAILURE: rest_api/recording/duration\nFAILURE: rest_api/recording/nominal"
29+
echo -e "$step_summary" >> logs/STEP_SUMMARY
30+
exit 1
31+
- name: Save Output
32+
id: save-output
33+
if: ${{ always() }}
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: job1
37+
path: |
38+
logs
39+
3240
33-
- name: Printenv
41+
Job2:
42+
runs-on: ubuntu-latest
43+
defaults:
44+
run:
45+
shell: bash
46+
steps:
47+
- name: test
3448
run: |
35-
printenv
49+
mkdir logs
50+
step_summary=""
51+
step_summary+="FAILURE: rest_api/recording/XXXXX\nFAILURE: rest_api/recording/YYYYYYY"
52+
echo -e "$step_summary" >> logs/STEP_SUMMARY
53+
exit 1
54+
- name: Save Output
55+
id: save-output
56+
if: ${{ always() }}
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: job2
60+
path: |
61+
logs
62+
63+
Cleanup:
64+
needs: [Job1, Job2]
65+
runs-on: ubuntu-latest
66+
if: ${{ always() }}
67+
defaults:
68+
run:
69+
shell: bash
70+
steps:
71+
- name: test
72+
run: |
73+
gh --repo ${{ github.repository }} \
74+
run download ${RUN_ID} -D run-${RUN_ID}
75+
find run-${RUN_ID} -name STEP_SUMMARY
76+
for f in $(find run-${RUN_ID} -name STEP_SUMMARY) ; do
77+
cat $f >> $GITHUB_STEP_SUMMARY
78+
done
79+
cat $GITHUB_STEP_SUMMARY
80+
3681
3782
# - name: DumpEnvironment
3883
# uses: asterisk/asterisk-ci-actions/DumpEnvironmentAction@main

0 commit comments

Comments
 (0)