-
Notifications
You must be signed in to change notification settings - Fork 92
/
Copy pathcircle.yml
155 lines (146 loc) · 3.7 KB
/
circle.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
154
155
version: 2.1
executors:
docker-executor:
docker:
- image: cimg/node:22.14.0
resource_class: medium
workflows:
main:
jobs:
- lint
- test-v8
- test-v9
- build-test-project
- test-test-project:
matrix:
parameters:
eslint-version: ['9']
config-file: [
# configurations correspond to examples in README
'default',
'recommended',
'globals',
]
requires:
- build-test-project
- release:
requires:
- lint
- test-v8
- test-v9
- test-test-project
filters:
branches:
only:
- master
jobs:
lint:
executor: docker-executor
steps:
- checkout
- run:
name: Install dependencies
command: npm ci
- run:
name: Show ESLint version
command: npx eslint --version
- run:
name: Lint code
command: npm run lint
test-v8:
executor: docker-executor
steps:
- checkout
- run:
name: Install dependencies
command: npm ci
- run:
name: Install ESLint 8
command: npm install eslint@8
- run:
name: Show ESLint version
command: npx eslint --version
- run:
name: Test ESLint 8
command: npm run test:legacy
test-v9:
executor: docker-executor
steps:
- checkout
- run:
name: Install dependencies
command: npm ci
- run:
name: Install ESLint 9
command: npm install eslint@9
- run:
name: Show ESLint version
command: npx eslint --version
- run:
name: Test ESLint 9
command: npm test
build-test-project:
executor: docker-executor
steps:
- checkout
- run:
name: Install dependencies
command: npm ci
- run:
name: Build tarball
command: npm pack
- run:
name: Get version
command: |
echo "PLUGIN_VERSION=$(jq -r '.version' package.json)" >> $BASH_ENV
cp $BASH_ENV bash.env
- persist_to_workspace:
root: .
paths:
- eslint-plugin-cypress-*.tgz
- bash.env
test-test-project:
description: Run ESLint with different configurations
parameters:
eslint-version:
description: Version of ESLint to use
default: 'latest'
type: string
config-file:
description: Configuration file
default: 'default'
type: string
executor: docker-executor
working_directory: ./test-project
steps:
- checkout:
path: ../
- attach_workspace:
at: .
- run:
name: Get plugin version
command: |
cat bash.env >> $BASH_ENV
- run:
name: Install dependencies
command: |
npm install eslint@<< parameters.eslint-version>> ./eslint-plugin-cypress-$PLUGIN_VERSION.tgz -D
- run:
name: Display ESLint version
command: |
npx eslint --version
- run: echo Testing a << parameters.config-file >> configuration
- run:
name: Lint with example configuration
command: |
npx eslint --config ./eslint-configs/eslint.<< parameters.config-file >>.mjs .
release:
executor: docker-executor
steps:
- checkout
- run:
name: Install dependencies
command: npm ci
- run:
name: Run semantic release
command: npm run semantic-release