-
Notifications
You must be signed in to change notification settings - Fork 133
83 lines (69 loc) · 1.92 KB
/
qan-api2.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: QAN
on:
push:
branches:
- main
- pmm-*
tags:
- v[0-9]+.[0-9]+.[0-9]+*
pull_request:
paths-ignore:
- "admin/**"
- "agent/**"
- "api-tests/**"
- "cli-tests/**"
- "docs/**"
- "managed/**"
- "update/**"
- "vmproxy/**"
permissions:
contents: read
jobs:
test:
name: Tests
runs-on: ubuntu-22.04
strategy:
fail-fast: false
defaults:
run:
working-directory: ${{ github.workspace }}/qan-api2
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Go release
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: ${{ github.workspace }}/go.mod
cache: false
- name: Enable Go build cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-${{ github.ref }}-${{ hashFiles('**') }}
restore-keys: |
${{ runner.os }}-go-build-${{ github.ref }}-
${{ runner.os }}-go-build-
- name: Enable Go modules cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-modules-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-modules-
- name: Download Go modules
run: go mod download -x
- name: Build and install
run: make install
- name: Initialize CI environment
run: make test-env-up
- name: Run Tests
run: |
make test-race
make test-cover
- name: Run debug commands on failure
if: ${{ failure() }}
run: |
env
go version
go env
pwd
git status