Skip to content

Commit 7d1f883

Browse files
committed
chore: GA action
1 parent d74ec1f commit 7d1f883

File tree

2 files changed

+87
-1
lines changed

2 files changed

+87
-1
lines changed

.github/workflows/ci.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: CI Pipeline
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
env:
10+
GOLANGCI_LINT_VERSION: v1.54.2
11+
12+
jobs:
13+
setup:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Go
20+
id: set-go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version-file: go.mod
24+
25+
build:
26+
runs-on: ubuntu-latest
27+
needs: setup
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v3
31+
32+
- name: Run Mage
33+
uses: magefile/mage-action@v3
34+
with:
35+
install-only: true
36+
37+
- name: Build
38+
run: |
39+
mage -v build
40+
41+
lint:
42+
runs-on: ubuntu-latest
43+
needs: setup
44+
steps:
45+
- name: Checkout code
46+
uses: actions/checkout@v3
47+
48+
- name: Install golangci-lint
49+
run: |
50+
wget -qO - https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $HOME/go/bin $GOLANGCI_LINT_VERSION
51+
echo "$HOME/go/bin" >> $GITHUB_PATH
52+
53+
- name: Run Mage
54+
uses: magefile/mage-action@v3
55+
with:
56+
install-only: true
57+
58+
- name: Lint
59+
run: |
60+
mage -v lint
61+
62+
test:
63+
runs-on: ubuntu-latest
64+
needs: setup
65+
steps:
66+
- name: Checkout code
67+
uses: actions/checkout@v3
68+
69+
- name: Install dependencies
70+
run: |
71+
sudo apt update
72+
sudo apt install -y gcc
73+
74+
- name: Run Mage
75+
uses: magefile/mage-action@v3
76+
with:
77+
install-only: true
78+
79+
- name: Run Mage
80+
uses: magefile/mage-action@v3
81+
with:
82+
install-only: true
83+
84+
- name: Test
85+
run: |
86+
CGO_ENABLED=1 mage -v testRace

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/grafana/grafana-plugin-sdk-go
22

3-
go 1.22.0
3+
go 1.22
44

55
require (
66
github.com/apache/arrow/go/v15 v15.0.2

0 commit comments

Comments
 (0)