Skip to content

Commit

Permalink
rearrange; 'make' runs slow tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jhump committed Dec 7, 2023
1 parent 49f888c commit 7aa1d1f
Show file tree
Hide file tree
Showing 4 changed files with 274 additions and 284 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.19.x, 1.20.x, 1.21.x] # when editing, also update steps and job below
# when editing this list, also update steps and jobs below
go-version: [1.19.x, 1.20.x, 1.21.x]
steps:
- name: Checkout Code
uses: actions/checkout@v4
Expand All @@ -34,10 +35,22 @@ jobs:
# supported version.
if: matrix.go-version == '1.21.x'
run: make checkgenerate && make lint
conformance:
runs-on: ubuntu-latest
strategy:
matrix:
# 1.19 is omitted because conformance test runner requires 1.20+
go-version: [1.20.x, 1.21.x]
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Run Conformance Tests
# A dependency of conformance tests (for testing http/3) requires
# Go 1.20. So we skip this step for Go 1.19.
if: matrix.go-version != '1.19.x'
run: make runconformance
slowtest:
runs-on: ubuntu-latest
Expand Down
17 changes: 12 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ help: ## Describe useful make targets
.PHONY: all
all: ## Build, test, and lint (default)
$(MAKE) test
$(MAKE) slowtest
$(MAKE) lint

.PHONY: clean
Expand All @@ -28,14 +29,20 @@ clean: ## Delete intermediate build artifacts

.PHONY: test
test: build ## Run unit tests
go test -vet=off -race -cover ./...
go test -vet=off -race -cover -short ./...

.PHONY: slowtest
# We may want a better way to classify these and run them as we add more.
# We don't run these with the race detector, and we only run them in CI
# for Linux and the latest version of Go.
# Runs all tests, including known long/slow ones. The
# race detector is not used for a few reasons:
# 1. Race coverage of the short tests should be
# adequate to catch race conditions.
# 2. It slows tests down, which is not good if we
# know these are already slow tests.
# 3. Some of the slow tests can't repro issues and
# find regressions as reliably with the race
# detector enabled.
slowtest: build
go test -run TestClientDeadline ./
go test ./...

.PHONY: runconformance
runconformance: build ## Run conformance test suite
Expand Down
275 changes: 0 additions & 275 deletions client_ext_norace_test.go

This file was deleted.

Loading

0 comments on commit 7aa1d1f

Please sign in to comment.