Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/test-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
tags:
- v[0-9]+.[0-9]+.[0-9]+** # Tag filters not as strict due to different regex system on Github Actions
pull_request:

env:
GOMAXPROCS: 1
jobs:
lint:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -54,7 +55,9 @@ jobs:
mkdir -p /go/src/github.com/cortexproject/cortex
ln -s $GITHUB_WORKSPACE/* /go/src/github.com/cortexproject/cortex
- name: Run Tests
run: make BUILD_IN_CONTAINER=false test
run: |
go run ./maxproc.go
make BUILD_IN_CONTAINER=false test

security:
name: CodeQL
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ lint:
./pkg/ruler/...

test:
go env
go test -tags netgo -timeout 30m -race -count 1 ./...

cover:
Expand Down
14 changes: 14 additions & 0 deletions maxproc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package main

import (
"fmt"
"runtime"
)

func getGOMAXPROCS() int {
return runtime.GOMAXPROCS(0)
}

func main() {
fmt.Printf("GOMAXPROCS is %d\n", getGOMAXPROCS())
}