-
Notifications
You must be signed in to change notification settings - Fork 16
39 lines (32 loc) · 1.37 KB
/
action_helper_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
---
# Perform unit-testing of the helper scripts used by github actions workflows
on: [push, pull_request]
# Variables required by multiple jobs/steps
env:
# Authoritative Cirrus-CI task to monitor for completion info of all other cirrus-ci tasks.
MONITOR_TASK: 'MONITOR/TEST/VALUE'
# Authoritative Github Action task (in cirrus-ci) to trigger / check for completion of _this_ workflow
ACTION_TASK: 'ACTION/TEST/VALUE'
HELPER_LIB_TEST: 'github/test/run_action_tests.sh'
# Enables debugging of github actions itself
# (see https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-a-debug-message)
ACTIONS_STEP_DEBUG: '${{ secrets.ACTIONS_STEP_DEBUG }}'
jobs:
helper_unit-test:
runs-on: ubuntu-latest
steps:
- name: Clone the repository code
uses: actions/checkout@v4
with:
persist-credentials: false
path: ./
- name: Execute helper library unit-tests using code from PR
run: |
./$HELPER_LIB_TEST
event-debug:
runs-on: ubuntu-latest
steps:
- name: Collect the originating event and result JSON
run: cp "${{ github.event_path }}" ./
- name: Log colorized and formatted event JSON
run: jq --indent 4 --color-output . ./event.json