Skip to content

Commit

Permalink
Merge pull request #17 from mackerelio/use-workflow
Browse files Browse the repository at this point in the history
Upgrade Go 1.22 and 1.21 by reusable workflow
  • Loading branch information
lufia authored Feb 22, 2024
2 parents ba7afc5 + 6c97e7e commit 3ed5baf
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 33 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ on:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
goreleaser:
uses: mackerelio/workflows/.github/workflows/goreleaser.yml@main

uses: mackerelio/workflows/.github/workflows/[email protected]
39 changes: 9 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,20 @@ name: test
on:
push:
branches:
- master
- main
tags:
- v*
pull_request:
env:
DEBIAN_FRONTEND: noninteractive
jobs:
lint:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: golangci/golangci-lint-action@v3
with:
args: --timeout 2m
uses: mackerelio/workflows/.github/workflows/[email protected]
test:
strategy:
matrix:
go: ["1.19.x", "1.18.x"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: |
make test
- run: |
./test.sh
uses: mackerelio/workflows/.github/workflows/[email protected]
testci:
uses: mackerelio/workflows/.github/workflows/[email protected]
with:
os-versions: '["ubuntu-22.04"]'
run: |
make testci
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ build:
go build -o mackerel-plugin-mysql

.PHONY: test
test: testgo build
test: testgo build testci

.PHONY: testci
testci:
go install github.com/lufia/graphitemetrictest/cmd/graphite-metric-test@latest
./test.sh

Expand Down

0 comments on commit 3ed5baf

Please sign in to comment.