-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (59 loc) · 1.61 KB
/
scripts.tests.yml
File metadata and controls
68 lines (59 loc) · 1.61 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Test the scripts.
name: Test Scripts
on:
pull_request:
branches:
- main
env:
# Allow running run-with-summary command.
PATH: ./src:./bin:./vendor/bin:/usr/local/bin:/usr/bin:/bin
jobs:
run-with-summary:
name: run-with-summary script
runs-on: ubuntu-latest
env:
SUCCESS: "Script run-with-summary succeeded! :white_check_mark:"
ERROR: "run-with-summary Failed! :x:"
SUMMARY: |
- Environment: https://pr${{ github.event.number }}.demo.site
- Pull Request: ${{github.event.pull_request.html_url }}
# Show extra details
DEBUG: yes
steps:
- uses: actions/checkout@v4
- name: run-with-summary success
env:
SUCCESS: "Directory List :white_check_mark:"
run: |
run-with-summary ls -la
- name: run-with-summary hide
env:
HIDE: true
SUCCESS: Processes
SUMMARY: This test should not show the process details table.
run: |
run-with-summary ps -aux
- name: run-with-summary failure
continue-on-error: true
env:
ERROR: "run-with-summary Failed on purpose! :x:"
run: |
echo $GITHUB_STEP_SUMMARY
run-with-summary ping w3.org -c5
wait-for:
name: wait-for script
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: wait-for failure
continue-on-error: true
env:
TIMEOUT: 2
run: |
run-with-summary wait-for bad-command
- name: wait-for success
continue-on-error: true
env:
TIMEOUT: 5
run: |
run-with-summary wait-for sleep 2