Run the tests under the race detector, in Docker (closes #23)
check / check (push) Successful in 23s
check / check (push) Successful in 23s
script/test is now the standard script: it builds only the test stage of the Dockerfile, without the build cache, so tests no longer run on the host. That stage calls go test -race -cover directly, with a verbose rerun on failure, on the Debian-based golang image, which has the C toolchain -race needs. The test stage no longer copies from the lint stage, so script/test builds the tests alone. A new final stage copies one file from each of the two stages; that is what makes a plain docker build, and so script/cibuild, run both. The README entry for script/test and TODO.md say what now runs. Model: opus-5-5
This commit was merged in pull request #40.
This commit is contained in:
@@ -145,7 +145,9 @@ alpine. We provide:
|
||||
`script/bootstrap`, then `script/install-precommit`
|
||||
- `script/projectname` — output the project name (our own extension); used by
|
||||
`script/docker` for the image tag
|
||||
- `script/test` — run the test suite (`go test -v ./...`)
|
||||
- `script/test` — run the test suite under the race detector in Docker by
|
||||
building only the `test` stage of the `Dockerfile`, without the build cache,
|
||||
so every run tests; the image is tagged `simplelog-test`
|
||||
- `script/lint` — run golangci-lint in Docker by building only the `lint`
|
||||
stage of the `Dockerfile` (which also runs the format check), without the
|
||||
build cache, so every run lints; the image is tagged `simplelog-lint`
|
||||
|
||||
Reference in New Issue
Block a user