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

Just testing a flaky test #7136

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
93 changes: 46 additions & 47 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,36 +65,35 @@ jobs:
path: coverage
- store_artifacts:
path: coverage

functional_tests:
machine:
image: ubuntu-2004:2024.01.1
docker_layer_caching: true
parallelism: 9
# parallelism: 9
resource_class: xlarge
steps:
- checkout
- run:
name: Determine specs to run
command: ./test-parallel.sh test/functional/cypress/specs
# - run:
# name: Determine specs to run
# command: ./test-parallel.sh test/functional/cypress/specs
- run_make:
label: Run functional tests
target: start-mock functional-tests
spec_files: $SPECS_TO_RUN
- store_cypress_artifacts
- run:
name: Prepare coverage report
command: |
mkdir -p partial-coverage
touch partial-coverage/.placeholder
if [ -f cypress-coverage/coverage-final.json ]; then
cp cypress-coverage/coverage-final.json partial-coverage/cypress-coverage-$CIRCLE_WORKFLOW_JOB_ID-index-$CIRCLE_NODE_INDEX.json
fi
# spec_files: $SPECS_TO_RUN
# - store_cypress_artifacts
# - run:
# name: Prepare coverage report
# command: |
# mkdir -p partial-coverage
# touch partial-coverage/.placeholder
# if [ -f cypress-coverage/coverage-final.json ]; then
# cp cypress-coverage/coverage-final.json partial-coverage/cypress-coverage-$CIRCLE_WORKFLOW_JOB_ID-index-$CIRCLE_NODE_INDEX.json
# fi

- persist_to_workspace:
root: ~/
paths:
- "project/partial-coverage/*"
# - persist_to_workspace:
# root: ~/
# paths:
# - "project/partial-coverage/*"

a11y_tests:
machine:
Expand Down Expand Up @@ -225,32 +224,32 @@ workflows:
version: 2
datahub:
jobs:
- lint: *ignore_ghpages
- unit_tests: *ignore_ghpages
- unit_client_tests: *ignore_ghpages
# - lint: *ignore_ghpages
# - unit_tests: *ignore_ghpages
# - unit_client_tests: *ignore_ghpages
- functional_tests: *ignore_ghpages
- a11y_tests: *ignore_ghpages
- component_tests: *ignore_ghpages
- e2e_tests:
<<: *ignore_ghpages
name: e2e_tests_<< matrix.staff >>
matrix:
parameters:
staff: [da, lep]
- e2e_tests_dit:
<<: *ignore_ghpages
name: e2e_tests_dit
matrix:
parameters:
staff: [dit]
- release-storybook:
<<: *ignore_ghpages
filters:
branches:
only:
- main
- merge-and-publish-coverage:
<<: *ignore_ghpages
requires:
- functional_tests
- unit_tests
# - a11y_tests: *ignore_ghpages
# - component_tests: *ignore_ghpages
# - e2e_tests:
# <<: *ignore_ghpages
# name: e2e_tests_<< matrix.staff >>
# matrix:
# parameters:
# staff: [da, lep]
# - e2e_tests_dit:
# <<: *ignore_ghpages
# name: e2e_tests_dit
# matrix:
# parameters:
# staff: [dit]
# - release-storybook:
# <<: *ignore_ghpages
# filters:
# branches:
# only:
# - main
# - merge-and-publish-coverage:
# <<: *ignore_ghpages
# requires:
# - functional_tests
# - unit_tests
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ endif

functional-tests:
@echo "*** Requires the mock stack, it can be started with 'make start-mock' ***"
$(docker-mock) exec frontend bash -c '$(wait-for-frontend) && npm run test:functional $(cypress-spec-args)'
$(docker-mock) exec frontend bash -c '$(wait-for-frontend) && npm run test:functional'

a11y-tests:
@echo "*** Requires the mock stack, it can be started with 'make start-mock' ***"
Expand Down
7 changes: 6 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
const config = require('./src/config')

module.exports = {
sourceType: 'unambiguous',
plugins: ['@babel/plugin-syntax-import-assertions'],
plugins: [
...(config.isDev ? ['react-refresh/babel'] : []),
'@babel/plugin-syntax-import-assertions',
],
env: {
test: {
plugins: ['istanbul'],
Expand Down
Loading
Loading