-
Notifications
You must be signed in to change notification settings - Fork 52
48 lines (48 loc) · 1.41 KB
/
ci.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
40
41
42
43
44
45
46
47
48
name: Build/test
on:
push:
branches:
- "main"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- 'main'
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [macos-latest, ubuntu-latest, windows-2019]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- run: npm install
- run: npm test
- run: scripts/test-keywords.sh
validate_tests:
runs-on: ["ubuntu-latest"]
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v3
- run: |
STATUS=0
if [[ $(grep -rn --exclude=errors.txt ERROR test/ | wc -l) -gt 0 ]]; then
echo "Found 'ERROR' in tests: "
grep -rn --exclude=errors.txt ERROR test/ | cut -f1,2 -d:
STATUS=1
fi
if [[ $(grep -rn --exclude=errors.txt MISSING test/ | wc -l) -gt 0 ]]; then
echo "Found 'MISSING' in tests: "
grep -rn --exclude=errors.txt MISSING test/ | cut -f1,2 -d:
STATUS=1
fi
if [[ $(grep -rn --exclude=errors.txt UNEXPECTED test/ | wc -l) -gt 0 ]]; then
echo "Found 'UNEXPECTED' in tests: "
grep -rn --exclude=errors.txt UNEXPECTED test/ | cut -f1,2 -d:
STATUS=1
fi
exit $STATUS