Skip to content

Commit

Permalink
Merge pull request #356 from Tinyblargon/ci-parallel
Browse files Browse the repository at this point in the history
CI parallel
  • Loading branch information
Tinyblargon authored Aug 15, 2024
2 parents df2e9b5 + 9caa336 commit 4d06080
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 @@ -6,39 +6,73 @@ on:
pull_request:
branches: [master]

jobs:
env:
GO_VERSION: '1.21'

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

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

- name: Verify dependencies
run: go mod verify
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
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@v2
- name: Set up Go
uses: actions/setup-go@v2
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@v2
- name: Set up Go
uses: actions/setup-go@v2
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@v2
- name: Set up Go
uses: actions/setup-go@v2
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 proxmox unit tests
run: go test -race -vet=off ./proxmox/... ./internal/...
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- name: Run proxmox unit tests
run: go test -race -vet=off ./proxmox/... ./internal/...

0 comments on commit 4d06080

Please sign in to comment.