Skip to content

Commit

Permalink
Merge pull request #6854 from reactioncommerce/ci-resource-xlarge
Browse files Browse the repository at this point in the history
Upgrade CircleCI resource from large to xlarge
  • Loading branch information
zenweasel committed Jun 15, 2023
2 parents 8aaf479 + e403668 commit b04166d
Show file tree
Hide file tree
Showing 197 changed files with 49 additions and 11 deletions.
52 changes: 44 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
name: Test Unit
no_output_timeout: 30m
command: pnpm test
resource_class: large
resource_class: xlarge

test-integration-query:
<<: *defaults
Expand Down Expand Up @@ -124,9 +124,9 @@ jobs:
sudo apt update && sudo apt-get install -y mongodb
mongo --eval "rs.initiate()"
pnpm run test:integration:query
resource_class: large
resource_class: xlarge

test-integration-mutation:
test-integration-mutation1:
<<: *defaults
docker:
- image: cimg/node:18.10.0
Expand Down Expand Up @@ -154,8 +154,39 @@ jobs:
command: |
sudo apt update && sudo apt-get install -y mongodb
mongo --eval "rs.initiate()"
pnpm run test:integration:mutation
resource_class: large
pnpm run test:integration:mutation1
resource_class: xlarge

test-integration-mutation2:
<<: *defaults
docker:
- image: cimg/node:18.10.0
# Integration tests need MongoDB server running and accessible on port 27017
- image: mongo:4.0
command: mongod --oplogSize 128 --replSet rs0 --storageEngine=wiredTiger
ports:
- "27017:27017"
- image: redis
ports:
- "6379:6379"
steps:
- checkout
- restore_cache:
keys:
- reaction-v7-node-modules-{{ checksum "package.json" }}-{{ checksum "pnpm-lock.yaml" }}
- reaction-v7-node-modules-{{ .Branch }}
- <<: *install_pnpm
- <<: *pnpm_install
- run:
name: Run Integration Mutation Tests
environment:
MONGO_URL: mongodb://localhost:27017/test
MONGO_USE_UNIFIED_TOPOLOGY: false
command: |
sudo apt update && sudo apt-get install -y mongodb
mongo --eval "rs.initiate()"
pnpm run test:integration:mutation2
resource_class: xlarge

release:
<<: *defaults
Expand Down Expand Up @@ -248,7 +279,10 @@ workflows:
- test-integration-query:
requires:
- install-dependencies
- test-integration-mutation:
- test-integration-mutation1:
requires:
- install-dependencies
- test-integration-mutation2:
requires:
- install-dependencies
- release:
Expand All @@ -263,7 +297,8 @@ workflows:
- graphql-lint
- test-unit
- test-integration-query
- test-integration-mutation
- test-integration-mutation1
- test-integration-mutation2
- docker-build-push:
context: reaction-publish-docker
filters:
Expand All @@ -276,4 +311,5 @@ workflows:
- graphql-lint
- test-unit
- test-integration-query
- test-integration-mutation
- test-integration-mutation1
- test-integration-mutation2
5 changes: 3 additions & 2 deletions apps/reaction/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@
"test:integration:watch": "node node_modules/jest/bin/jest --runInBand --watch --testPathIgnorePatterns '<rootDir>/src/'",
"test:integration:file": "jest --runInBand",
"test:integration:file:watch": "jest --runInBand --watch",
"test:integration:query": "node --max-old-space-size=7168 --expose-gc ../../node_modules/jest/bin/jest.js --forceExit --runInBand --logHeapUsage --testPathIgnorePatterns '<rootDir>/src/' '<rootDir>/tests/integration/api/mutations/'",
"test:integration:mutation": "node --max_old_space_size=7168 --expose-gc ../../node_modules/jest/bin/jest.js --forceExit --runInBand --logHeapUsage --testPathIgnorePatterns '<rootDir>/src/' '<rootDir>/tests/integration/api/queries/'",
"test:integration:query": "node --max-old-space-size=12288 --expose-gc ../../node_modules/jest/bin/jest.js --forceExit --runInBand --logHeapUsage --testPathIgnorePatterns '<rootDir>/src/' '<rootDir>/tests/integration/api/mutations1/' '<rootDir>/tests/integration/api/mutations2/'",
"test:integration:mutation1": "node --max_old_space_size=12288 --expose-gc ../../node_modules/jest/bin/jest.js --forceExit --runInBand --logHeapUsage --testPathIgnorePatterns '<rootDir>/src/' '<rootDir>/tests/integration/api/queries/' '<rootDir>/tests/integration/api/mutations2/'",
"test:integration:mutation2": "node --max_old_space_size=12288 --expose-gc ../../node_modules/jest/bin/jest.js --forceExit --runInBand --logHeapUsage --testPathIgnorePatterns '<rootDir>/src/' '<rootDir>/tests/integration/api/queries/' '<rootDir>/tests/integration/api/mutations1/'",
"lint": "eslint .",
"lint:gql": "graphql-schema-linter ./src/**/*.graphql",
"version": "echo $npm_package_version",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"build:packages": "pnpm -r run build",
"test": "pnpm -r run test",
"test:integration:query": "pnpm --filter 'reaction' test:integration:query",
"test:integration:mutation": "pnpm --filter 'reaction' test:integration:mutation",
"test:integration:mutation1": "pnpm --filter 'reaction' test:integration:mutation1",
"test:integration:mutation2": "pnpm --filter 'reaction' test:integration:mutation2",
"lint": "eslint -c .eslintrc.cjs .",
"lint:docker": "npx --quiet --package @reactioncommerce/ci-scripts@1.6.2 lint-dockerfiles --workspace=apps/reaction",
"lint:gql": "pnpm -r run lint:gql",
Expand Down

0 comments on commit b04166d

Please sign in to comment.