1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-05 18:40:59 +00:00

test: run all tests with the data race detector (#861)

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/861
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
This commit is contained in:
earl-warren 2025-08-21 04:50:48 +00:00
commit 33e0ab7b68
No known key found for this signature in database
GPG key ID: F128CBE6AB3A7201
2 changed files with 9 additions and 6 deletions

View file

@ -144,10 +144,11 @@ jobs:
apt-get update -qq apt-get update -qq
apt-get -q install -qq -y docker.io apt-get -q install -qq -y docker.io
- run: apt-get -q install -qq -y gcc # required for `-race`
- name: integration test - name: integration test
run: | run: |
go test ./act/container go test -race ./act/container
go test -timeout 30m ./act/runner/... go test -race -timeout 30m ./act/runner/...
runner-integration-tests: runner-integration-tests:
name: runner integration tests name: runner integration tests
@ -185,6 +186,8 @@ jobs:
EOF EOF
apt --quiet install --yes -qq docker.io make apt --quiet install --yes -qq docker.io make
- run: apt-get -q install -qq -y gcc # required for `-race`
- run: make integration-test - run: make integration-test
validate-mocks: validate-mocks:

View file

@ -106,12 +106,12 @@ fmt-check:
fi; fi;
test: lint-check fmt-check test: lint-check fmt-check
$(GO) test -v -short -cover -coverprofile coverage.txt ./internal/... $(GO) test -v -race -short -cover -coverprofile coverage.txt ./internal/...
$(GO) test -short ./act/container $(GO) test -race -short ./act/container
$(GO) test ./act/artifactcache/... ./act/workflowpattern/... ./act/filecollector/... ./act/common/... ./act/jobparser ./act/model ./act/exprparser ./act/schema $(GO) test -race ./act/artifactcache/... ./act/workflowpattern/... ./act/filecollector/... ./act/common/... ./act/jobparser ./act/model ./act/exprparser ./act/schema
integration-test: integration-test:
@$(GO) test -v ./internal/app/run/... @$(GO) test -race -v ./internal/app/run/...
.PHONY: vet .PHONY: vet
vet: vet: