Skip to content

Commit

Permalink
ci: run build action via matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
dhth committed Sep 11, 2024
1 parent 6165bf2 commit f8af515
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ env:

jobs:
build:
name: build
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Go
Expand All @@ -27,7 +29,3 @@ jobs:
go-version: ${{ env.GO_VERSION }}
- name: go build
run: go build -v ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60
27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: lint

on:
push:
branches: ["main"]
pull_request:
paths:
- "go.*"
- "**/*.go"
- ".github/workflows/*.yml"

env:
GO_VERSION: '1.23.0'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60

0 comments on commit f8af515

Please sign in to comment.