-
Notifications
You must be signed in to change notification settings - Fork 9
41 lines (38 loc) · 986 Bytes
/
qa.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
name: QA & sanity checks
on:
push:
branches:
- main
tags:
- "*"
pull_request:
jobs:
sanity:
name: Code sanity
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Go code sanity check
uses: canonical/desktop-engineering/gh-actions/go/code-sanity@main
with:
golangci-lint-configfile: ".golangci.yaml"
tools-directory: "tools"
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Run tests
run: |
set -eu
go test -coverpkg=./... -coverprofile=/tmp/coverage.out -covermode=set ./... -shuffle=on
- name: Run tests (with race detector)
run: |
go test -race ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: /tmp/coverage.combined