-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (33 loc) · 952 Bytes
/
go-test.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
# SPDX-FileCopyrightText: 2021 Wharf (Iver Sverige AB) <https://github.com/iver-wharf>
#
# SPDX-License-Identifier: MIT
name: Go test
on:
pull_request:
branches: [ '**' ]
jobs:
run_tests:
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.18'
- name: Set up gotestfmt
uses: haveyoudebuggedit/gotestfmt-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: v1.0.0
- name: checkout
uses: actions/checkout@v2
- name: Run tests
run: |
# One for GitHub Action logging purposes
go test -v ./... 2>&1 | gotestfmt
# One for golang-test-annotations
go test -json ./... > test-results.json
- name: Annotate tests
if: always()
uses: guyarb/golang-test-annotations@v0.5.0
with:
test-results: test-results.json