Skip to content

Commit c1136c8

Browse files
committed
chore: move all jobs to single job
1 parent 6a9ede1 commit c1136c8

File tree

3 files changed

+86
-42
lines changed

3 files changed

+86
-42
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,43 +7,37 @@ on:
77
pull_request:
88

99
jobs:
10-
build:
10+
build_lint_test:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v4
15+
1516
- name: Setup go
1617
uses: actions/setup-go@v5
1718
with:
1819
go-version-file: go.mod
20+
1921
- name: Setup Mage
2022
uses: magefile/mage-action@v3
2123
with:
2224
install-only: true
2325

26+
- name: Install test dependencies
27+
run: |
28+
sudo apt update
29+
sudo apt install -y gcc
30+
31+
- name: Setup CI Linter
32+
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2
33+
2434
- name: Build
2535
run: |
2636
mage -v build
2737
28-
test:
29-
runs-on: ubuntu-latest
30-
needs: build
31-
steps:
32-
- name: Checkout
33-
uses: actions/checkout@v4
34-
- name: Setup go
35-
uses: actions/setup-go@v5
36-
with:
37-
go-version-file: go.mod
38-
- name: Install dependencies
38+
- name: Lint
3939
run: |
40-
sudo apt update
41-
sudo apt install -y gcc
42-
43-
- name: Setup Mage
44-
uses: magefile/mage-action@v3
45-
with:
46-
install-only: true
40+
mage -v lint
4741
4842
- name: Test
4943
run: |

.github/workflows/lint.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.remove-drone.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
# This file must be signed. You can do so with the `mage drone` command
3+
4+
kind: pipeline
5+
type: docker
6+
name: main
7+
8+
platform:
9+
os: linux
10+
arch: amd64
11+
12+
trigger:
13+
branch: main
14+
event:
15+
- push
16+
17+
steps:
18+
- name: build
19+
image: grafana/grafana-plugin-ci:1.9.5
20+
commands:
21+
- mage -v build
22+
23+
- name: lint
24+
image: grafana/grafana-plugin-ci:1.9.5
25+
commands:
26+
- mage -v lint
27+
28+
- name: test
29+
image: grafana/grafana-plugin-ci:1.9.5
30+
commands:
31+
# -race requires cgo + a C compiler
32+
- apt update
33+
- apt install -y gcc
34+
- mage -v testRace
35+
environment:
36+
CGO_ENABLED: "1"
37+
---
38+
kind: pipeline
39+
type: docker
40+
name: pr
41+
42+
platform:
43+
os: linux
44+
arch: amd64
45+
46+
trigger:
47+
event:
48+
# - pull_request
49+
50+
steps:
51+
- name: build
52+
image: grafana/grafana-plugin-ci:1.9.5
53+
commands:
54+
- mage -v build
55+
56+
- name: lint
57+
image: grafana/grafana-plugin-ci:1.9.5
58+
commands:
59+
- mage -v lint
60+
61+
- name: test
62+
image: grafana/grafana-plugin-ci:1.9.5
63+
commands:
64+
# -race requires cgo + a C compiler
65+
- apt update
66+
- apt install -y gcc
67+
- mage -v testRace
68+
environment:
69+
CGO_ENABLED: "1"
70+
71+
---
72+
kind: signature
73+
hmac: cee688a6f8ed3ecb1ddd384e349a6556d28b23b298057d8fa02da37ab50b0ba7

0 commit comments

Comments
 (0)