Skip to content

Commit

Permalink
build(workflows): run CI workflows on PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
aybabtme committed Oct 25, 2024
1 parent 9ed6225 commit 4545307
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 8 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
name: Go
on: [push]
name: go test ./...
on:
push:
branches:
- master
pull_request:

jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
go: [stable]
os: [ubuntu-latest, macos-latest, windows-latest]

name: test
runs-on: ${{ matrix.os }}
steps:

- name: Set up Go 1.23
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.23
id: go
go-version: ${{ matrix.go }}

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: golangci-lint
on:
push:
branches:
- master
pull_request:

permissions:
contents: read
checks: write

jobs:
golangci:
strategy:
matrix:
go: [stable]
os: [ubuntu-latest, macos-latest, windows-latest]

name: lint
runs-on: ${{ matrix.os }}
steps:

- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60

0 comments on commit 4545307

Please sign in to comment.