-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (46 loc) · 1.39 KB
/
go-test-example.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
name: go-test example
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
LAUNCHABLE_DEBUG: 1
LAUNCHABLE_REPORT_ERROR: 1
jobs:
tests:
env:
LAUNCHABLE_TOKEN: ${{ secrets.LAUNCHABLE_GO_EXAMPLE_TOKEN }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Clone go-test example
run: git clone https://github.com/launchableinc/examples.git
- name: Install dependencies
run: go install github.com/jstemmer/go-junit-report@latest
- name: test
run: cd examples/go && go test -v ./... 2>&1 | go-junit-report -set-exit-code > report.xml
- name: Record build and test results
uses: ./
# uses: launchableinc/record-build-and-test-results-action@v1.0.0
with:
build_name: $GITHUB_RUN_ID
report_path: ./examples/go/
test_runner: go-test
source_path: ./examples/go/
if: always()
- name: remove .launchable
run: rm -f .launchable
- name: Record test results without build
uses: ./
# uses: launchableinc/record-build-and-test-results-action@v1.0.0
with:
report_path: ./examples/go/
no_build: "true"
test_runner: go-test
source_path: ./examples/go/
if: always()