Skip to content

Commit

Permalink
Merge pull request #34 from mackerelio/update
Browse files Browse the repository at this point in the history
use Reusable workflow
  • Loading branch information
yseto committed Aug 26, 2022
2 parents 3bffe12 + c8c3971 commit 99a0e16
Showing 1 changed file with 4 additions and 40 deletions.
44 changes: 4 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,13 @@ name: Build
on:
push:
branches:
- master
- master
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
- uses: golangci/golangci-lint-action@v3
with:
version: v1.46
- uses: actions/checkout@v3
- uses: golangci/golangci-lint-action@v3
test:
strategy:
matrix:
os: ["ubuntu-20.04", "macOS-11", "windows-2019"]
go: ["1.18.x", "1.17.x"]
runs-on: ${{ matrix.os }}
steps:
- 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-
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- run: go test -race -covermode=atomic -coverprofile=profile.cov
shell: bash
- uses: shogo82148/actions-goveralls@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-profile: profile.cov
parallel: true
flag-name: Go-${{ matrix.go }}
finish:
needs: [lint, test]
runs-on: ubuntu-latest
steps:
- uses: shogo82148/actions-goveralls@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
uses: mackerelio/workflows/.github/workflows/go-test.yml@main

0 comments on commit 99a0e16

Please sign in to comment.