Skip to content

Commit

Permalink
fix(repo): restore circle config
Browse files Browse the repository at this point in the history
  • Loading branch information
vsavkin committed Jan 15, 2021
1 parent 8653d37 commit 9a84179
Showing 1 changed file with 156 additions and 67 deletions.
223 changes: 156 additions & 67 deletions .circleci/config.yml
@@ -1,45 +1,81 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2.1

# Variables
var_1: &working_directory ~/repo

executors:
linux:
working_directory: *working_directory
default:
working_directory: ~/repo
environment:
# install Cypress in Linux-like cache folder
CYPRESS_CACHE_FOLDER: '~/.cache/Cypress'
docker:
- image: cimg/node:12.20-browsers
- image: circleci/node:12-browsers

commands:
setup:
parameters:
os:
type: string
install_rsync:
description: 'Install Rsync'
steps:
- checkout
- restore_cache:
name: Restore Yarn Package Cache
keys:
- nrwl-nx-yarn-packages-<< parameters.os >>-{{ checksum "yarn.lock" }}
- run:
name: Install dependencies
command: yarn install --frozen-lockfile --non-interactive --cache-folder ~/.cache/yarn
- run: sudo apt install rsync
yarn_install:
description: 'Install Dependencies'
steps:
- run: yarn install --frozen-lockfile --non-interactive
- run: ./node_modules/.bin/cypress verify
- save_cache:
name: Save Yarn Package Cache
# Windows needs its own cache key because binaries in node_modules are different.
key: nrwl-nx-yarn-packages-<< parameters.os >>-{{ checksum "yarn.lock" }}
key: nrwl-nx-node12-yarn-key-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- save_cache:
key: nrwl-nx-node12-cypress-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/Cypress
restore_cypress_cache:
description: 'Restore Cypress Cache'
steps:
- restore_cache:
keys:
- nrwl-nx-node12-cypress-{{ checksum "yarn.lock" }}
# fallback to using the latest cache if no exact match is found
- nrwl-nx-node12-cypress-
restore_yarn_cache:
description: 'Restore Cached Dependencies'
steps:
- restore_cache:
keys:
- nrwl-nx-node12-yarn-key-{{ checksum "yarn.lock" }}
# fallback to using the latest cache if no exact match is found
- nrwl-nx-node12-yarn-key-
setup:
description: 'Setup Executor'
steps:
- checkout
- install_rsync
- attach_workspace:
# Must be absolute path or relative path from working_directory
at: ..

jobs:
install:
executor: default
steps:
- checkout
- restore_yarn_cache
- restore_cypress_cache
- yarn_install
- persist_to_workspace:
# Must be an absolute path, or relative path from working_directory. This is a directory on the container which is
# taken to be the root directory of the workspace.
root: ..
# Must be relative path from root
paths:
- repo/node_modules
- .cache/Cypress
checks-and-unit-tests:
parameters:
os:
type: string
default: 'linux'
executor: << parameters.os >>
executor: default
steps:
- setup:
os: << parameters.os >>
- setup
- run:
name: Run Unit Tests
command: yarn test
Expand All @@ -61,47 +97,100 @@ jobs:
- run:
name: Check Package dependencies
command: yarn depcheck
e2e:
parameters:
os:
type: string
packages:
type: string
cli:
type: string
default: ''
executor: << parameters.os >>
e2e-1:
executor: default
steps:
- setup:
os: << parameters.os >>
- setup
- run:
name: Run E2E tests - << parameters.packages >>
command: yarn e2e << parameters.packages >> affected
name: Tests Part 1
command: yarn e2e-ci 1
no_output_timeout: 30m
e2e-2:
executor: default
steps:
- setup
- run:
name: Tests Part 2
command: yarn e2e-ci 2
no_output_timeout: 30m
e2e-3:
executor: default
steps:
- setup
- run:
name: Tests Part 3
command: yarn e2e-ci 3
no_output_timeout: 30m
e2e-4:
executor: default
steps:
- setup
- run:
name: Tests Part 4
command: yarn e2e-ci 4
no_output_timeout: 30m
e2e-5:
executor: default
steps:
- setup
- run:
name: Tests Part 5
command: yarn e2e-ci 5
no_output_timeout: 30m
e2e-6:
executor: default
steps:
- setup
- run:
name: Tests Part 6
command: yarn e2e-ci 6
no_output_timeout: 30m
e2e-7:
executor: default
steps:
- setup
- run:
name: Tests Part 7
command: yarn e2e-ci 7
no_output_timeout: 30m
e2e-8:
executor: default
steps:
- setup
- run:
name: Tests Part 8
command: yarn e2e-ci 8
no_output_timeout: 30m
environment:
SELECTED_CLI: << parameters.cli >>

workflows:
build:
version: 2.1
default_workflow:
jobs:
- checks-and-unit-tests
- e2e:
matrix:
parameters:
os: ['linux']
packages:
[
'e2e-workspace',
'e2e-cli,e2e-nx-plugin,dep-graph-client-e2e',
'e2e-cypress,e2e-jest',
'e2e-react',
'e2e-next',
'e2e-node',
'e2e-web,e2e-linter,e2e-storybook',
]
- e2e:
matrix:
parameters:
os: ['linux']
packages: ['e2e-angular']
cli: 'angular'
- install
- checks-and-unit-tests:
requires:
- install
- e2e-1:
requires:
- install
- e2e-2:
requires:
- install
- e2e-3:
requires:
- install
- e2e-4:
requires:
- install
- e2e-5:
requires:
- install
- e2e-6:
requires:
- install
- e2e-7:
requires:
- install
- e2e-8:
requires:
- install

0 comments on commit 9a84179

Please sign in to comment.