Skip to content

Commit

Permalink
chore: move all jobs to single job
Browse files Browse the repository at this point in the history
  • Loading branch information
s4kh committed Oct 15, 2024
1 parent 25c8440 commit d59787f
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 42 deletions.
32 changes: 13 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,37 @@ on:
pull_request:

jobs:
build:
build_lint_test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Setup Mage
uses: magefile/mage-action@v3
with:
install-only: true

- name: Install test dependencies
run: |
sudo apt update
sudo apt install -y gcc
- name: Setup CI Linter
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2

- name: Build
run: |
mage -v build
test:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Install dependencies
- name: Lint
run: |
sudo apt update
sudo apt install -y gcc
- name: Setup Mage
uses: magefile/mage-action@v3
with:
install-only: true
mage -v lint
- name: Test
run: |
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/lint.yml

This file was deleted.

73 changes: 73 additions & 0 deletions .remove-drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
# This file must be signed. You can do so with the `mage drone` command

kind: pipeline
type: docker
name: main

platform:
os: linux
arch: amd64

trigger:
branch: main
event:
- push

steps:
- name: build
image: grafana/grafana-plugin-ci:1.9.5
commands:
- mage -v build

- name: lint
image: grafana/grafana-plugin-ci:1.9.5
commands:
- mage -v lint

- name: test
image: grafana/grafana-plugin-ci:1.9.5
commands:
# -race requires cgo + a C compiler
- apt update
- apt install -y gcc
- mage -v testRace
environment:
CGO_ENABLED: "1"
---
kind: pipeline
type: docker
name: pr

platform:
os: linux
arch: amd64

trigger:
event:
# - pull_request

steps:
- name: build
image: grafana/grafana-plugin-ci:1.9.5
commands:
- mage -v build

- name: lint
image: grafana/grafana-plugin-ci:1.9.5
commands:
- mage -v lint

- name: test
image: grafana/grafana-plugin-ci:1.9.5
commands:
# -race requires cgo + a C compiler
- apt update
- apt install -y gcc
- mage -v testRace
environment:
CGO_ENABLED: "1"

---
kind: signature
hmac: cee688a6f8ed3ecb1ddd384e349a6556d28b23b298057d8fa02da37ab50b0ba7

0 comments on commit d59787f

Please sign in to comment.