-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (52 loc) · 1.49 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
name: QA
# QA checks on a regular Github runner, allowing for concurrent runs.
# The tests run on a mock back-end.
on:
pull_request:
workflow_dispatch:
push:
branches: [main]
jobs:
quality:
name: "Quality checks"
# This job ensures the project compiles and the linter passes before commiting
# to the whole Github-Azure-WSL orchestra.
strategy:
matrix:
os: [ubuntu, windows]
runs-on: ${{ matrix.os }}-latest
steps:
- name: Set up Git
shell: bash
run : |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
shell: bash
run: |
go build ./...
- name: Lint with mock back-end
uses: golangci/golangci-lint-action@v6
with:
version: v1.56.2
args: --build-tags="gowslmock"
- name: Lint with real back-end
uses: golangci/golangci-lint-action@v6
with:
version: v1.56.2
- name: Test with mocks
shell: bash
run: go test -tags="gowslmock" -shuffle=on
- name: Test with mocks, race flag enabled
# We skip it on Windows because -race depends on Cgo, which is
# complicated to enable (it requires Cygwin, MSVC support is
# broken)
if: ${{ matrix.os }} == "ubuntu"
shell: bash
run: go test -tags="gowslmock" -shuffle=on -race