@financial-times/n-conversion-forms
Version:
Containing jsx components and styles for forms included on Accounts and Acqusition apps (next-signup, next-profile, next-retention, etc).
174 lines (151 loc) • 4.28 kB
YAML
# generator: n-circle2-cli
# template: component
references:
container_config_node:
working_directory: ~/project/build
docker:
- image: cimg/node:16.17-browsers
workspace_root:
~/project
attach_workspace:
attach_workspace:
at:
npm_cache_keys:
keys:
- v3-dependency-npm-{{ checksum "package.json" }}-
- v3-dependency-npm-{{ checksum "package.json" }}
- v3-dependency-npm-
cache_npm_cache:
save_cache:
key: v3-dependency-npm-{{ checksum "package.json" }}-{{ epoch }}
paths:
- ./node_modules/
restore_npm_cache:
restore_cache:
<<:
filters_only_main:
branches:
only: main
filters_only_renovate_nori:
branches:
only: /(^renovate-.*|^nori/.*)/
filters_ignore_tags_renovate_nori:
tags:
ignore: /.*/
branches:
ignore: /(^renovate-.*|^nori/.*)/
filters_version_tag:
tags:
only:
- /^v?\d+\.\d+\.\d+(?:-beta\.\d+)?$/
branches:
ignore: /.*/
version: 2.1
orbs:
node: circleci/node@4.9.0
jobs:
build:
<<:
steps:
- checkout
- run:
name: Checkout next-ci-shared-helpers
command: git clone --depth 1 git@github.com:Financial-Times/next-ci-shared-helpers.git .circleci/shared-helpers
-
- node/install-npm:
version: "^7"
- run:
name: Install project dependencies
command: make install
- run:
name: Run the project build task
command: make build
- run:
name: shared-helper / generate-build-state-artifacts
command: .circleci/shared-helpers/helper-generate-build-state-artifacts
when: always
-
- store_artifacts:
path: build-state
destination: build-state
- persist_to_workspace:
root:
paths:
- build
test:
<<:
steps:
-
- run:
name: Run tests
command: npm run lint && make test
environment:
JEST_JUNIT_OUTPUT: test-results/jest/results.xml
MOCHA_FILE: test-results/mocha/results.xml
- store_test_results:
path: test-results
- store_artifacts:
path: test-results
destination: test-results
publish:
<<:
steps:
-
- run:
name: shared-helper / npm-store-auth-token
command: .circleci/shared-helpers/helper-npm-store-auth-token
- run: npx snyk monitor --org=customer-products --project-name=Financial-Times/n-conversion-forms
- run:
name: shared-helper / npm-version-and-publish-public
command: .circleci/shared-helpers/helper-npm-version-and-publish-public
workflows:
version: 2
build-test:
jobs:
- build:
filters:
<<:
- test:
requires:
- build
build-test-publish:
jobs:
- build:
filters:
<<:
- test:
filters:
<<:
requires:
- build
- publish:
context: npm-publish-token
filters:
<<:
requires:
- test
renovate-nori-build-test-provision:
jobs:
- waiting-for-approval:
type: approval
filters:
<<:
- build:
requires:
- waiting-for-approval
- test:
requires:
- build
nightly:
triggers:
- schedule:
cron: "0 0 * * *"
filters:
<<:
jobs:
- build:
context: next-nightly-build
- test:
requires:
- build
context: next-nightly-build