Skip to content
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

Always run linting tests even when PRs skip other tests #2233

Merged
merged 5 commits into from
Jan 15, 2020
Merged
Changes from 4 commits
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
22 changes: 11 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ x-save-cache: &save-cache
x-integration-steps: &integration-steps
steps:
- checkout
- run:
name: 'Is test required'
command: node ./.circleci/run-or-bail.js
- run:
name: Yarn - Install packages
command: CYPRESS_CACHE_FOLDER=$CIRCLE_WORKING_DIRECTORY/node_modules/cypress/.cache/ yarn
- save_cache: *save-cache
- run:
name: 'Is test required'
command: node ./.circleci/run-or-bail.js
- run:
name: E2E Cypress tests
command: CYPRESS_CACHE_FOLDER=$CIRCLE_WORKING_DIRECTORY/node_modules/cypress/.cache/ yarn --cwd $PROJECT_DIRECTORY cypress:run:ci
Expand All @@ -64,6 +64,14 @@ x-integration-steps: &integration-steps
x-simple-tests: &simple-tests
steps:
- checkout
# Set Cypress cache dir here, in case this job runs/completes first, and
# hence clobbers the `node_modules` cache with a non-cypress version,
# causing the other job to fail with a "Missing Cypress" error.
- run: CYPRESS_CACHE_FOLDER=$CIRCLE_WORKING_DIRECTORY/node_modules/cypress/.cache/ yarn
- save_cache: *save-cache
- run: yarn lint:eslint --format junit -o reports/junit/js-lint-results.xml
- run: yarn lint:prettier
- run: yarn lint:markdown
- run:
name: 'Is test required'
command: node ./.circleci/run-or-bail.js
Expand All @@ -72,15 +80,7 @@ x-simple-tests: &simple-tests
- run: psql -d $TEST_DATABASE_URL -c "CREATE SCHEMA keystone;"
- run: psql -d $TEST_DATABASE_URL -c "CREATE USER keystone5 PASSWORD 'k3yst0n3';"
- run: psql -d $TEST_DATABASE_URL -c "GRANT ALL ON SCHEMA keystone TO keystone5;"
# Set Cypress cache dir here, in case this job runs/completes first, and
# hence clobbers the `node_modules` cache with a non-cypress version,
# causing the other job to fail with a "Missing Cypress" error.
- run: CYPRESS_CACHE_FOLDER=$CIRCLE_WORKING_DIRECTORY/node_modules/cypress/.cache/ yarn
- save_cache: *save-cache
# run tests!
- run: yarn lint:eslint --format junit -o reports/junit/js-lint-results.xml
- run: yarn lint:prettier
- run: yarn lint:markdown
- run:
name: Unit tests
command: yarn jest --ci --reporters=default --reporters=jest-junit --maxWorkers=1
Expand Down