-
Notifications
You must be signed in to change notification settings - Fork 6
50 lines (48 loc) · 1.36 KB
/
go-test-results-parsing-ci.yaml
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
name: 'semver-compare-build-ci'
on:
pull_request:
paths:
- '.github/workflows/go-test-results-parsing-ci.yaml'
- 'go/go-test-results-parsing/**'
push:
branches:
- main
- 'release/*'
paths:
- '.github/workflows/go-test-results-parsing-ci.yaml'
- 'go/go-test-results-parsing/**'
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- run: |
cd go/go-test-results-parsing
npm ci
npm run all
test:
runs-on: ubuntu-latest
strategy:
matrix:
output-mode: ['unit', 'e2e']
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: ./go/go-test-results-parsing
id: action_run
continue-on-error: true
with:
results-file: ./go/go-test-results-parsing/__tests__/fixtures/go_test_results_input.json
output-mode: ${{ matrix.output-mode }}
- name: Check for expected failure
run: |
RESULT=${{ steps.action_run.outcome }}
if [[ "$RESULT" == "failure" ]]; then
echo "Running the action created the expected failure."
exit 0
else
echo "Running the action should cause a failure."
exit 1
fi