2022-06-03 17:54:05 +01:00
|
|
|
version: 2.1
|
2018-03-18 03:08:48 +00:00
|
|
|
jobs:
|
2022-06-03 17:54:05 +01:00
|
|
|
|
|
|
|
lint:
|
2018-03-18 03:08:48 +00:00
|
|
|
docker:
|
2024-08-22 14:27:54 +00:00
|
|
|
- image: cimg/node:20.17.0
|
2018-03-18 03:08:48 +00:00
|
|
|
|
|
|
|
working_directory: ~/repo
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
|
2020-03-16 19:36:09 +00:00
|
|
|
- restore_cache:
|
2024-08-04 15:41:49 -04:00
|
|
|
key: node_modules-{{ checksum "package-lock.json" }}
|
2020-03-16 19:36:09 +00:00
|
|
|
|
2024-08-04 15:41:49 -04:00
|
|
|
- run: test -d node_modules || npm i
|
2018-03-18 03:08:48 +00:00
|
|
|
|
2020-03-16 19:36:09 +00:00
|
|
|
- save_cache:
|
2024-08-04 15:41:49 -04:00
|
|
|
key: node_modules-{{ checksum "package-lock.json" }}
|
2020-03-16 19:36:09 +00:00
|
|
|
paths:
|
|
|
|
- node_modules
|
|
|
|
|
2018-03-18 03:08:48 +00:00
|
|
|
# run tests!
|
2022-06-03 17:54:05 +01:00
|
|
|
- run:
|
2024-08-04 15:41:49 -04:00
|
|
|
command: npm run tslint && npm run lint
|
2022-06-03 17:54:05 +01:00
|
|
|
|
|
|
|
unit:
|
|
|
|
docker:
|
2024-08-22 14:27:54 +00:00
|
|
|
- image: cimg/node:20.17.0
|
2022-06-03 17:54:05 +01:00
|
|
|
|
|
|
|
working_directory: ~/repo
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
|
|
|
|
- restore_cache:
|
2024-08-04 15:41:49 -04:00
|
|
|
key: node_modules-{{ checksum "package-lock.json" }}
|
2022-06-03 17:54:05 +01:00
|
|
|
|
2024-08-04 15:41:49 -04:00
|
|
|
- run: test -d node_modules || npm i
|
2022-06-03 17:54:05 +01:00
|
|
|
|
|
|
|
- save_cache:
|
2024-08-04 15:41:49 -04:00
|
|
|
key: node_modules-{{ checksum "package-lock.json" }}
|
2022-06-03 17:54:05 +01:00
|
|
|
paths:
|
|
|
|
- node_modules
|
|
|
|
|
|
|
|
# run tests!
|
|
|
|
- run:
|
2024-08-04 15:41:49 -04:00
|
|
|
command: npm run unit
|
2022-06-03 17:54:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
integration:
|
|
|
|
docker:
|
2024-08-22 14:27:54 +00:00
|
|
|
- image: cimg/node:20.17.0
|
2022-06-03 17:54:05 +01:00
|
|
|
|
2024-07-24 21:18:28 +01:00
|
|
|
environment:
|
|
|
|
RETRY: "1"
|
|
|
|
|
2022-06-03 17:54:05 +01:00
|
|
|
working_directory: ~/repo
|
|
|
|
|
2023-03-04 13:51:11 -04:00
|
|
|
resource_class: large
|
|
|
|
|
2022-06-03 17:54:05 +01:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
|
|
|
|
- restore_cache:
|
2024-08-04 15:41:49 -04:00
|
|
|
key: node_modules-{{ checksum "package-lock.json" }}
|
2022-06-03 17:54:05 +01:00
|
|
|
|
2024-08-04 15:41:49 -04:00
|
|
|
- run: test -d node_modules || npm i
|
2022-06-03 17:54:05 +01:00
|
|
|
|
|
|
|
- save_cache:
|
2024-08-04 15:41:49 -04:00
|
|
|
key: node_modules-{{ checksum "package-lock.json" }}
|
2022-06-03 17:54:05 +01:00
|
|
|
paths:
|
|
|
|
- node_modules
|
|
|
|
|
|
|
|
# run tests!
|
|
|
|
- run:
|
2024-08-04 15:41:49 -04:00
|
|
|
command: npm run jest || npm run jest || npm run jest || npm run jest
|
2022-06-03 17:54:05 +01:00
|
|
|
|
|
|
|
# Orchestrate our job run sequence
|
|
|
|
workflows:
|
|
|
|
build_and_test:
|
|
|
|
jobs:
|
|
|
|
- lint
|
|
|
|
- unit
|
|
|
|
- integration
|