-
Notifications
You must be signed in to change notification settings - Fork 314
49 lines (45 loc) · 1.27 KB
/
admin-test.yaml
File metadata and controls
49 lines (45 loc) · 1.27 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
46
47
48
49
name: Go Admin API Test
on:
push:
branches:
- dev
paths:
- 'src/server/api/go/**'
- '.github/workflows/admin-test.yaml'
pull_request:
branches:
- dev
paths:
- 'src/server/api/go/**'
- '.github/workflows/admin-test.yaml'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30
defaults:
run:
working-directory: src/server/api/go
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c
with:
go-version-file: src/server/api/go/go.mod
cache: true
cache-dependency-path: src/server/api/go/go.sum
- run: go mod tidy
- name: Run tests with coverage
run: go test -v -timeout 30m -coverprofile=coverage.out -covermode=atomic ./...
- name: Upload coverage artifact
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: go-admin-coverage
path: src/server/api/go/coverage.out
retention-days: 30