Skip to content

Commit

Permalink
Merge pull request #1082 from Tinyblargon/ci-parallel
Browse files Browse the repository at this point in the history
CI parallel
  • Loading branch information
Tinyblargon authored Aug 30, 2024
2 parents 3c87e45 + b1c1a0a commit 302238b
Showing 1 changed file with 63 additions and 29 deletions.
92 changes: 63 additions & 29 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,73 @@ on:
- 'docs/**'
- 'examples/**'

jobs:
env:
GO_VERSION: '1.21'

audit:
jobs:
verify-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
check-latest: true

- name: Verify dependencies
run: go mod verify
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- name: Verify dependencies
run: go mod verify

- name: Build
run: go build -v ./...

- name: Run go vet
run: go vet ./...

- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest

- name: Run staticcheck
run: staticcheck ./...
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- name: Build
run: go build -v ./...

- name: Install golint
run: go install golang.org/x/lint/golint@latest
vet:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- name: Run go vet
run: go vet ./...

- name: Run golint
run: golint ./...
staticcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Run staticcheck
run: staticcheck ./...

- name: Run tests
run: go test -race -vet=off ./...
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- name: Run tests
run: go test -race -vet=off ./...

0 comments on commit 302238b

Please sign in to comment.