diff --git a/.editorconfig b/.editorconfig index b54df526a6832..227be2a6df852 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,7 +7,7 @@ trim_trailing_whitespace = true insert_final_newline = true indent_style = tab -[*.{md,json,yaml,tf,tfvars}] +[*.{md,json,yaml,yml,tf,tfvars}] indent_style = space indent_size = 2 diff --git a/.github/codecov.yml b/.github/codecov.yml index 7a95f53c5d3f1..0e1cadd432fa5 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -34,3 +34,7 @@ ignore: - scripts - site/.storybook - rules.go + # Packages used for writing tests. + - cli/clitest + - coderd/coderdtest + - pty/ptytest diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index b2cf2d7d93a9c..0f86b85212b1f 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -297,7 +297,7 @@ jobs: # systems. if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then echo ::set-output name=cover::true - export COVERAGE_FLAGS='-covermode=atomic -coverprofile="gotests.coverage" -coverpkg=./...,github.com/coder/coder/codersdk' + export COVERAGE_FLAGS='-covermode=atomic -coverprofile="gotests.coverage" -coverpkg=./...' else echo ::set-output name=cover::false fi diff --git a/.vscode/settings.json b/.vscode/settings.json index 0d81d15cc32b5..74308369e644f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -117,7 +117,9 @@ "go.coverOnSave": true, // The codersdk is used by coderd another other packages extensively. // To reduce redundancy in tests, it's covered by other packages. - "go.testFlags": ["-short", "-coverpkg=./.,github.com/coder/coder/codersdk"], + // Since package coverage pairing can't be defined, all packages cover + // all other packages. + "go.testFlags": ["-short", "-coverpkg=./..."], "go.coverageDecorator": { "type": "gutter", "coveredHighlightColor": "rgba(64,128,128,0.5)", diff --git a/Makefile b/Makefile index d8b9cbe41f524..997cbc0d4e460 100644 --- a/Makefile +++ b/Makefile @@ -176,7 +176,7 @@ test: test-clean test-postgres: test-clean test-postgres-docker DB=ci DB_FROM=$(shell go run scripts/migrate-ci/main.go) gotestsum --junitfile="gotests.xml" --packages="./..." -- \ -covermode=atomic -coverprofile="gotests.coverage" -timeout=20m \ - -coverpkg=./...,github.com/coder/coder/codersdk \ + -coverpkg=./... \ -count=1 -race -failfast .PHONY: test-postgres