This repository has been archived by the owner on Oct 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
153 lines (137 loc) · 4.6 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2.1
aliases:
- &restore-cache-deps
key: dependency-cache-{{ .Environment.CIRCLE_BRANCH }}-{{ checksum "package.json" }}-2.1
- &save-cache-deps
key: dependency-cache-{{ .Environment.CIRCLE_BRANCH }}-{{ checksum "package.json" }}-2.1
paths:
- node_modules
defaults: &defaults
working_directory: ~/really-clipboard-copy
docker:
- image: circleci/node:8-browsers
jobs:
build:
<<: *defaults
steps:
- checkout
- restore_cache: *restore-cache-deps
- run:
name: Git Log
command: |
if [ -z "$(git describe --exact-match HEAD)" ]; then
echo "Not tagged commit"
fi
if [ -z "$(git log --format=%B -n 1 | grep -iE '^[0-9]+[.]{1,}[0-9]+[.]{1,}[0-9]+$')" ]; then
echo "No tag/ version in commit message"
fi
- run:
name: Install Global Dependencies
command: sudo npm i -g npm@latest --quiet
- run:
name: Install Dependencies
command: npm ci --quiet
- save_cache: *save-cache-deps
- run:
name: Versions
command: node -v && npm version && which npm && pwd
- run:
name: Lint
command: npm run lint
- run:
name: Build
command: npm run ts
- persist_to_workspace:
root: ~/really-clipboard-copy
paths:
- "*"
test_local:
<<: *defaults
steps:
- attach_workspace:
at: ~/really-clipboard-copy
- run:
name: Test
command: npx -p web-component-tester -- npm run test:ci
test_ie_11:
<<: *defaults
steps:
- attach_workspace:
at: ~/really-clipboard-copy
- run:
name: Test (Internet Explorer 11)
command: |
if [ -z "${CIRCLE_PULL_REQUEST}" ] && [ -z "$(git describe --exact-match HEAD)" ] && [ -z "$(git log --format=%B -n 1 | grep -iE '^[0-9]+[.]{1,}[0-9]+[.]{1,}[0-9]+$')" ]; then
npx -p web-component-tester -- npm run test:sl -- -s 'windows 7/internet explorer@11';
fi
test_edge:
<<: *defaults
steps:
- attach_workspace:
at: ~/really-clipboard-copy
- run:
name: Test (Edge 17, 13)
command: |
if [ -z "${CIRCLE_PULL_REQUEST}" ] && [ -z "$(git describe --exact-match HEAD)" ] && [ -z "$(git log --format=%B -n 1 | grep -iE '^[0-9]+[.]{1,}[0-9]+[.]{1,}[0-9]+$')" ]; then
npx -p web-component-tester -- npm run test:sl -- -s 'windows 10/microsoftedge@17' -s 'windows 10/microsoftedge@13';
fi
test_safari:
<<: *defaults
steps:
- attach_workspace:
at: ~/really-clipboard-copy
- run:
name: Test (Safari 10.1, 9)
command: |
if [ -z "${CIRCLE_PULL_REQUEST}" ] && [ -z "$(git describe --exact-match HEAD)" ] && [ -z "$(git log --format=%B -n 1 | grep -iE '^[0-9]+[.]{1,}[0-9]+[.]{1,}[0-9]+$')" ]; then
npx -p web-component-tester -- npm run test:sl -- -s 'macos 10.12/[email protected]' -s 'os x 10.11/safari@9';
fi
test_chrome:
<<: *defaults
steps:
- attach_workspace:
at: ~/really-clipboard-copy
- run:
name: Test (Chrome 69, 41)
command: |
if [ -z "${CIRCLE_PULL_REQUEST}" ] && [ -z "$(git describe --exact-match HEAD)" ] && [ -z "$(git log --format=%B -n 1 | grep -iE '^[0-9]+[.]{1,}[0-9]+[.]{1,}[0-9]+$')" ]; then
npx -p web-component-tester -- npm run test:sl -- -s 'windows 10/chrome@69' -s 'Linux/chrome@41';
fi
test_firefox:
<<: *defaults
steps:
- attach_workspace:
at: ~/really-clipboard-copy
- run:
name: Test (Firefox 63, 62)
command: |
if [ -z "${CIRCLE_PULL_REQUEST}" ] && [ -z "$(git describe --exact-match HEAD)" ] && [ -z "$(git log --format=%B -n 1 | grep -iE '^[0-9]+[.]{1,}[0-9]+[.]{1,}[0-9]+$')" ]; then
npx -p web-component-tester -- npm run test:sl -- -s 'windows 10/firefox@63' -s 'macos 10.14/firefox@62';
fi
workflows:
version: 2
multi-build-n-test:
jobs:
- build
- test_local:
requires:
- build
- test_ie_11:
requires:
- build
- test_edge:
requires:
- build
- test_safari:
requires:
- build
- test_chrome:
requires:
- build
- test_firefox:
requires:
- build