Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 1.06 KB

testing.md

File metadata and controls

28 lines (20 loc) · 1.06 KB

Testing

Running tests locally

To run tests for the Go source code, run go test ./..., or specify a package directly, go test ./util/textutil.

To run tests for the website, run yarn run test.

To run the end-to-end tests for the website: yarn run test-e2e. See docs/web.md for more information.

Continuous Integration

The test suite is exercised on every pull request. For the moment CI output access is limited to Sourcegraph employees, though we hope to enable public read-only access soon.

The test pipeline is generated by dev/ci/gen-pipeline.go, and written to a YAML file by dev/ci/init-pipeline.yml. This pipeline is immediately scheduled by Buildkite to run on the Sourcegraph build farm. Some things that are tested include:

  • all of the Go source files that have tests
  • dev/check/all.sh (gofmt, lint, go generator, no Security TODO's, Bash syntax, others)
  • JS formatting/linting (prettier, tslint, stylelint, graphql-lint)
  • Dockerfile linter (hadolint)
  • Check whether the Go module folders are "tidy" (go mod tidy)