-
Notifications
You must be signed in to change notification settings - Fork 225
62 lines (55 loc) · 1.65 KB
/
Copy pathci.yml
File metadata and controls
62 lines (55 loc) · 1.65 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
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Checks
on:
pull_request:
push:
branches:
- main
# This workflow runs for not-yet-reviewed external contributions and so it
# intentionally has no write access and only limited read access to the
# repository.
permissions:
contents: read
jobs:
lint:
name: "Run linting"
runs-on: ubuntu-latest
strategy:
matrix:
GO_VERSION:
- 'oldstable'
- 'stable'
steps:
- name: "checkout source"
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v4.0.0
- name: "setup toolchain"
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
cache: true
go-version: ${{ matrix.GO_VERSION }}
- name: "lint"
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
- name: "go.mod and go.sum consistency check"
run: make tidy
unit-tests:
name: "Unit Tests"
runs-on: ubuntu-latest
strategy:
matrix:
GO_VERSION:
- 'oldstable'
- 'stable'
steps:
- name: "checkout source"
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v4.0.0
- name: "setup toolchain"
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: ${{ matrix.GO_VERSION }}
cache: true
- name: "Unit tests and coverage report"
run: make cov
- name: Upload coverage report
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
path: coverage.out
name: Coverage-report-${{matrix.GO_VERSION}}