Skip to content

chore: skip some flaky tests #1643

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 20, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
add makefile targets, reduce parallelism in go test
  • Loading branch information
johnstcn committed May 20, 2022
commit 399cb3fb596dd268eb70b26b3661c1ab21892db7
5 changes: 1 addition & 4 deletions .github/workflows/coder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,7 @@ jobs:
done

- name: Test with PostgreSQL Database
run: DB=ci gotestsum --junitfile="gotests.xml" --packages="./..." --
-covermode=atomic -coverprofile="gotests.coverage" -timeout=3m
-coverpkg=./...,github.com/coder/coder/codersdk
-count=1 -parallel=2 -race -failfast
run: "make test-postgres"

- name: Upload DataDog Trace
if: always() && github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork
Expand Down
30 changes: 29 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,33 @@ site/src/api/typesGenerated.ts: scripts/apitypings/main.go $(shell find codersdk
go run scripts/apitypings/main.go > site/src/api/typesGenerated.ts
cd site && yarn run format:types

test:
.PHONY: test
test: test-clean
gotestsum -- -v -short ./...

.PHONY: test-postgres
test-postgres: test-clean
DB=ci gotestsum --junitfile="gotests.xml" --packages="./..." -- \
-covermode=atomic -coverprofile="gotests.coverage" -timeout=5m \
-coverpkg=./...,github.com/coder/coder/codersdk \
-count=1 -parallel=1 -race -failfast


.PHONY: test-postgres-docker
test-postgres-docker:
docker run \
--env POSTGRES_PASSWORD=postgres \
--env POSTGRES_USER=postgres \
--env POSTGRES_DB=postgres \
--env PGDATA=/tmp \
--publish 5432:5432 \
--name test-postgres-docker \
--restart unless-stopped \
--detach \
postgres:11 \
-c shared_buffers=1GB \
-c max_connections=1000

.PHONY: test-clean
test-clean:
go clean -testcache