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