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:
commit
33e0ab7b68
2 changed files with 9 additions and 6 deletions
|
@ -144,10 +144,11 @@ jobs:
|
|||
apt-get update -qq
|
||||
apt-get -q install -qq -y docker.io
|
||||
|
||||
- run: apt-get -q install -qq -y gcc # required for `-race`
|
||||
- name: integration test
|
||||
run: |
|
||||
go test ./act/container
|
||||
go test -timeout 30m ./act/runner/...
|
||||
go test -race ./act/container
|
||||
go test -race -timeout 30m ./act/runner/...
|
||||
|
||||
runner-integration-tests:
|
||||
name: runner integration tests
|
||||
|
@ -185,6 +186,8 @@ jobs:
|
|||
EOF
|
||||
apt --quiet install --yes -qq docker.io make
|
||||
|
||||
- run: apt-get -q install -qq -y gcc # required for `-race`
|
||||
|
||||
- run: make integration-test
|
||||
|
||||
validate-mocks:
|
||||
|
|
8
Makefile
8
Makefile
|
@ -106,12 +106,12 @@ fmt-check:
|
|||
fi;
|
||||
|
||||
test: lint-check fmt-check
|
||||
$(GO) test -v -short -cover -coverprofile coverage.txt ./internal/...
|
||||
$(GO) test -short ./act/container
|
||||
$(GO) test ./act/artifactcache/... ./act/workflowpattern/... ./act/filecollector/... ./act/common/... ./act/jobparser ./act/model ./act/exprparser ./act/schema
|
||||
$(GO) test -v -race -short -cover -coverprofile coverage.txt ./internal/...
|
||||
$(GO) test -race -short ./act/container
|
||||
$(GO) test -race ./act/artifactcache/... ./act/workflowpattern/... ./act/filecollector/... ./act/common/... ./act/jobparser ./act/model ./act/exprparser ./act/schema
|
||||
|
||||
integration-test:
|
||||
@$(GO) test -v ./internal/app/run/...
|
||||
@$(GO) test -race -v ./internal/app/run/...
|
||||
|
||||
.PHONY: vet
|
||||
vet:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue