about
about copied to clipboard
Sourcegraph blog, feature announcements, and website (about.sourcegraph.com)
Sourcegraph's Marketing Site
This is Sourcegraph's Marketing Site which is a Next.js project bootstrapped with create-next-app.
Getting Started
Node.js
First, make sure that you have Node.js installed. You can use nvm to automatically use the version of Node.js which is specified in the repository's .nvmrc file:
nvm install
Alternatively, you can use n to manage your Node versions. Use the following command to install the version of Node specified in the .nvmrc file:
n <node version>
Install Dependencies
From the top level of the project, run the following command to install dependencies:
yarn ci
This will install the dependencies while ensuring the lock file remains unmodified.
Running the Application
To run the application, type the following command from the top level of the project:
yarn dev
Open http://localhost:3000 with your browser to see the result.
Configure the pre-commit Githook
To enable our pre-commit hook, update the following git config setting in the project:
git config core.hooksPath .githooks
Testing
We use Cypress as our test suite and currently have end to end tests configured.
To run tests visually, run:
yarn test
To run tests headlessly in the CLI, run:
yarn test:ci
End to End Tests
- To create an e2e test, add them to the e2e directory with a descriptive file name.
- To run tests in development, run
yarn testwhich watches your test files as you develop. Cypress will open in a new window. - Click on E2E Testing and choose a preferred browser. Click on "Start E2E Testing in {browser}.
- You will see the tests we have under specs. Click a spec to run the test.
- Alternatively, you can run tests in the command line in headless mode by running
yarn test:ci.