-
Notifications
You must be signed in to change notification settings - Fork 30
57 lines (51 loc) · 1.39 KB
/
quality.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
# SPDX-FileCopyrightText: 2023 Iván Szkiba
# SPDX-FileCopyrightText: 2023 Raintank, Inc. dba Grafana Labs
#
# SPDX-License-Identifier: AGPL-3.0-only
# SPDX-License-Identifier: MIT
name: Quality
on: [push, pull_request, workflow_dispatch]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: Checkout code
uses: actions/checkout@v4
- name: Lint
uses: magefile/mage-action@v3
with:
version: latest
args: tools lint
test:
name: Test
needs: [lint]
strategy:
matrix:
platform:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{matrix.platform}}
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
- name: Checkout code
uses: actions/checkout@v4
- name: Test
uses: magefile/mage-action@v3
with:
version: v1.14.0
args: test
- name: Upload Coverage
if: ${{ matrix.platform == 'ubuntu-latest' && github.ref_name == 'master' }}
uses: codecov/codecov-action@v5
- name: Generate Go Report Card
if: ${{ matrix.platform == 'ubuntu-latest' && github.ref_name == 'master' }}
uses: creekorful/[email protected]