ci: limit parallelism to 8 threads (GOMAXPROCS + max-parallel)
This commit is contained in:
@@ -30,6 +30,8 @@ jobs:
|
|||||||
run: go mod download
|
run: go mod download
|
||||||
|
|
||||||
- name: Run tests with race detection
|
- name: Run tests with race detection
|
||||||
|
env:
|
||||||
|
GOMAXPROCS: 8
|
||||||
run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
|
run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
|
||||||
|
|
||||||
- name: Generate coverage report
|
- name: Generate coverage report
|
||||||
@@ -55,6 +57,8 @@ jobs:
|
|||||||
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.2
|
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.2
|
||||||
|
|
||||||
- name: Run golangci-lint
|
- name: Run golangci-lint
|
||||||
|
env:
|
||||||
|
GOMAXPROCS: 8
|
||||||
run: golangci-lint run --timeout=5m ./...
|
run: golangci-lint run --timeout=5m ./...
|
||||||
|
|
||||||
build:
|
build:
|
||||||
@@ -64,6 +68,7 @@ jobs:
|
|||||||
container:
|
container:
|
||||||
image: golang:1.24-bookworm
|
image: golang:1.24-bookworm
|
||||||
strategy:
|
strategy:
|
||||||
|
max-parallel: 8
|
||||||
matrix:
|
matrix:
|
||||||
goos: [linux, darwin]
|
goos: [linux, darwin]
|
||||||
goarch: [amd64, arm64]
|
goarch: [amd64, arm64]
|
||||||
@@ -81,6 +86,7 @@ jobs:
|
|||||||
GOOS: ${{ matrix.goos }}
|
GOOS: ${{ matrix.goos }}
|
||||||
GOARCH: ${{ matrix.goarch }}
|
GOARCH: ${{ matrix.goarch }}
|
||||||
CGO_ENABLED: 0
|
CGO_ENABLED: 0
|
||||||
|
GOMAXPROCS: 8
|
||||||
run: |
|
run: |
|
||||||
BINARY_NAME=dbbackup
|
BINARY_NAME=dbbackup
|
||||||
go build -ldflags="-s -w" -o dist/${BINARY_NAME}-${{ matrix.goos }}-${{ matrix.goarch }} .
|
go build -ldflags="-s -w" -o dist/${BINARY_NAME}-${{ matrix.goos }}-${{ matrix.goarch }} .
|
||||||
|
|||||||
Reference in New Issue
Block a user