You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.7 KiB
60 lines
1.7 KiB
# This config is equivalent to both the '.circleci/extended/orb-free.yml' and the base '.circleci/config.yml'
|
|
version: 2.1
|
|
|
|
# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.
|
|
# See: https://circleci.com/docs/2.0/orb-intro/
|
|
orbs:
|
|
node: circleci/node@4.7
|
|
|
|
jobs:
|
|
install: &shared-config
|
|
docker:
|
|
- image: circleci/node:lts-fermium
|
|
working_directory: ~/repo
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- dependencies-{{ checksum "package.json" }}-v1
|
|
- dependencies-
|
|
- run: yarn install
|
|
- save_cache:
|
|
paths:
|
|
- node_modules
|
|
key: dependencies-{{ checksum "package.json" }}-v1
|
|
|
|
|
|
unit-tests:
|
|
<<: *shared-config
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys: dependencies-{{ checksum "package.json" }}-v1
|
|
- run: yarn test:unit
|
|
|
|
|
|
build:
|
|
<<: *shared-config
|
|
environment:
|
|
- VITE_BACKEND_URL_URL: $VITE_BACKEND_URL_URL
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- dependencies-{{ checksum "package.json" }}-v1
|
|
- dependencies-
|
|
- run: yarn build
|
|
|
|
# Invoke jobs via workflows
|
|
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
|
|
workflows:
|
|
sample: # This is the name of the workflow, feel free to change it to better match your workflow.
|
|
# Inside the workflow, you define the jobs you want to run.
|
|
jobs:
|
|
- install
|
|
- unit-tests:
|
|
requires:
|
|
- install
|
|
- build:
|
|
requires:
|
|
- unit-tests
|