- Clone this repo and
cd
into it - Run
npm install
to pull dependencies - Run
npm start
to runwebpack-dev-server
in development mode with hot module replacement
If you want to build a local version run npm build
, it will create the files in the dist
folder.
You do not need to build to deploy the code, that is automatic. See more info in the Deployment section below.
- Make sure if you are using Visual Studio Code that you use the workspace version of TypeScript.
To ensure that you are open a TypeScript file in VSC and then click on the version number next to
TypeScript React
in the status bar and select 'Use Workspace Version' in the popup menu.
Production releases to S3 are based on the contents of the /dist folder and are built automatically by GitHub Actions for each branch pushed to GitHub and each merge into production.
Merges into production are deployed to http://researcher-reports.concord.org.
Other branches are deployed to http://researcher-reports.concord.org/branch/.
To deploy a production release:
- Increment version number in package.json
- Create new entry in CHANGELOG.md
- Run
git log --pretty=oneline --reverse <last release tag>...HEAD | grep '#' | grep -v Merge
and add contents (after edits if needed to CHANGELOG.md) - Run
npm run build
- Copy asset size markdown table from previous release and change sizes to match new sizes in
dist
- Create
release-<version>
branch and commit changes, push to GitHub, create PR and merge - Test the master build at: https://researcher-reports.concord.org/index-master.html
- Push a version tag to GitHub and/or use https://github.com/concord-consortium/researcher-reports/releases to create a new GitHub release
- Stage the release by running the Release Staging Workflow and entering the version tag you just pushed.
- Test the staged release at https://researcher-reports.concord.org/index-staging.html
- Update production by running the Release Workflow and entering the release version tag.
Run npm test
to run jest tests. Run npm run test:full
to run jest and Cypress tests.
Inside of your package.json
file:
--browser browser-name
: define browser for running tests--group group-name
: assign a group name for tests running--spec
: define the spec files to run--headed
: show cypress test runner GUI while running test (will exit by default when done)--no-exit
: keep cypress test runner GUI open when done running--record
: decide whether or not tests will have video recordings--key
: specify your secret record key--reporter
: specify a mocha reporter
cypress run --browser chrome
will run cypress in a chrome browsercypress run --headed --no-exit
will open cypress test runner when tests begin to run, and it will remain open when tests are finished running.cypress run --spec 'cypress/integration/examples/smoke-test.js'
will point to a smoke-test file rather than running all of the test files for a project.
Researcher Reports are Copyright 2021 (c) by the Concord Consortium and is distributed under the MIT license.
See license.md for the complete license text.