-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (36 loc) · 1.21 KB
/
Copy pathscripts.yml
File metadata and controls
45 lines (36 loc) · 1.21 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
name: Script CI
on:
push:
paths:
- '.scripts/**'
- '.github/workflows/scripts**'
pull_request:
paths:
- '.scripts/**'
- '.github/workflows/scripts**'
schedule:
# weekly build every FRI
- cron: "0 6 * * 5"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: OK fails and string found
working-directory: .scripts
run: |
rm -rf temp.txt | true
sh assure_failing_test.sh 'echo expacted_string && fails' 'expacted_string' > temp.txt
grep "Successfully failed a test" temp.txt
- name: FAIL string found but does not fail
working-directory: .scripts
run: |
rm -rf temp.txt | true
! sh assure_failing_test.sh 'echo expacted_string && true' 'expacted_string' > temp.txt
grep "Please make sure there is a failing test example!" temp.txt
- name: FAIL fails but string not found
working-directory: .scripts
run: |
rm -rf temp.txt | true
! sh assure_failing_test.sh 'echo expacted_string && false' 'string_not_found' > temp.txt
grep "Please make sure there is a failing test example!" temp.txt