-
Notifications
You must be signed in to change notification settings - Fork 58
/
config.yml
120 lines (104 loc) · 2.85 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
version: 2.1
executors:
node12:
docker:
- image: circleci/node:12
environment:
NPM_CONFIG_PREFIX: ~/.npm-global
commands:
setup:
steps:
- checkout
- restore_cache:
keys:
- v4-dependencies-{{ arch }}-{{ checksum "package-lock.json" }}
- run:
name: install latest npm
command: sudo npm -g install npm
- run:
name: Installing Dependencies
command: npm ci
- save_cache:
paths:
- node_modules
key: v4-dependencies-{{ arch }}-{{ checksum "package-lock.json" }}
- run:
name: prepare test git user
command: git config --global user.email "circleci@project-helix.io" && git config --global user.name "CircleCi Build"
orbs:
helix-smoke-tests: adobe/helix-smoke-tests@0.1.0
win: circleci/windows-tools@0.1.0
jobs:
build_win:
parallelism: 1
executor: win/default
steps:
- run: git config --global core.autocrlf false
- run:
name: prepare test git user
command: git config --global user.email "circleci@project-helix.io"
- run:
name: prepare test git user
command: git config --global user.name "CircleCi Build"
- checkout
- run: choco install nodejs-lts --version=10.16.3
- run: npm install
- run: mkdir junit
# test & get code coverage
- run:
name: Test and Code Coverage
command: npm run test-ci-win
environment:
MOCHA_FILE: junit/test-results.xml
- store_test_results:
path: junit
- store_artifacts:
path: junit
build:
parallelism: 1
executor: node12
working_directory: ~/repo
steps:
- setup
# run tests!
- run: mkdir junit
- run:
name: prepare test git user
command: git config --global user.email "you@example.com" && git config --global user.name "Your Name"
- run:
name: Lint
command: npm run lint-ci
# test & get code coverage
- run:
name: Test and Code Coverage
command: npm run test-ci
environment:
MOCHA_FILE: junit/test-results.xml
- store_test_results:
path: junit
- store_artifacts:
path: junit
forkwarning:
executor: node12
working_directory: ~/repo
steps:
- run: echo "Warning - this PR is coming from a fork repository, no smoke tests will be run".
workflows:
version: 2
build:
jobs:
- build
# - build_win
smoke:
jobs:
- helix-smoke-tests/run:
filters:
branches:
# Forked pull requests have CIRCLE_BRANCH set to pull/XXX
ignore: /pull\/[0-9]+/
remote_repo: adobe/helix-continuous
- forkwarning:
filters:
branches:
# Forked pull requests have CIRCLE_BRANCH set to pull/XXX
only: /pull\/[0-9]+/