Skip to content

Commit dc46de6

Browse files
committed
chore: ability to publish dev branch
1 parent 1dcdb35 commit dc46de6

File tree

3 files changed

+116
-73
lines changed

3 files changed

+116
-73
lines changed

.circleci/config.yml

Lines changed: 100 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ jobs:
1515
CYPRESS_INSTALL_BINARY: '0'
1616
steps:
1717
- attach_workspace:
18-
at: ~/
18+
at: ~/
1919
- run:
2020
name: Code style check 🧹
2121
command: npm run format:check
22+
- run: npm run check:markdown
23+
2224
publish:
2325
description: Publishes the new version of the plugin to NPM
2426
docker:
@@ -32,19 +34,19 @@ jobs:
3234
CIRCLE_PULL_REQUEST: ''
3335
CI_PULL_REQUEST: ''
3436
steps:
35-
- checkout
36-
- run: npm ci
37+
- attach_workspace:
38+
at: ~/
3739
- run: npm run semantic-release
38-
40+
3941
cyrun:
4042
docker:
4143
- image: cypress/base:16.13.2
4244
parameters:
43-
jobname:
44-
type: string
45+
jobname:
46+
type: string
4547
steps:
4648
- attach_workspace:
47-
at: ~/
49+
at: ~/
4850
- run:
4951
command: npm run test
5052
working_directory: test-apps/<< parameters.jobname >>
@@ -67,7 +69,7 @@ jobs:
6769
- image: cypress/base:16.13.2
6870
steps:
6971
- attach_workspace:
70-
at: ~/
72+
at: ~/
7173
- run:
7274
command: npm run test
7375
- store_artifacts:
@@ -78,8 +80,7 @@ jobs:
7880

7981
workflows:
8082
build:
81-
jobs:
82-
83+
jobs:
8384
- cypress/install:
8485
cache-key: 'cache-{{ arch }}-{{ .Branch }}-{{ checksum "package-lock.json" }}'
8586
pre-steps:
@@ -94,23 +95,23 @@ workflows:
9495
command: npm ci
9596
working_directory: test-apps/new-cypress-config
9697
post-steps:
97-
- run: npm run check:markdown
98+
- run: npm run check:markdown
9899

99100
- lint:
100101
requires:
101102
- cypress/install
102103

103104
- test-code-coverage-plugin:
104105
requires:
105-
- cypress/install
106+
- cypress/install
106107

107108
- cyrun:
108109
name: test-<< matrix.jobname>>
109-
requires:
110+
requires:
110111
- cypress/install
111112
matrix:
112113
parameters:
113-
jobname:
114+
jobname:
114115
- old-cypress-config/all-files
115116
- old-cypress-config/backend
116117
- old-cypress-config/before-all-visit
@@ -137,62 +138,89 @@ workflows:
137138
- new-cypress-config/ts-example
138139
- new-cypress-config/unit-tests-js
139140
- new-cypress-config/use-webpack
140-
141-
# - cypress/run:
142-
# name: Windows test
143-
# executor:
144-
# # executor comes from the "windows" orb
145-
# name: win/default
146-
# shell: bash.exe
147-
# no-workspace: true
148-
# start: npm run start:windows --prefix test-apps/old-cypress-config/all-files
149-
# wait-on: 'http://localhost:1234'
150-
# command: ../node_modules/.bin/cypress run
151-
# # store screenshots and videos
152-
# store_artifacts: true
153-
# post-steps:
154-
# - run: cat test-apps/old-cypress-config/all-files/.nyc_output/out.json
155-
# - run: cat test-apps/old-cypress-config/all-files/coverage/coverage-final.json
156-
# # store the created coverage report folder
157-
# # you can click on it in the CircleCI UI
158-
# # to see live static HTML site
159-
# - store_artifacts:
160-
# path: test-apps/old-cypress-config/all-files/coverage
161-
# # make sure the test-apps captures 100% of code
162-
# - run:
163-
# command: npx nyc report --check-coverage true --lines 100
164-
# working_directory: test-apps/old-cypress-config/all-files
165-
# - run:
166-
# name: Check code coverage 📈
167-
# # we will check the final coverage report
168-
# # to make sure it only has files we are interested in
169-
# # because there are files covered at 0 in the report
170-
# command: |
171-
# ../../node_modules/.bin/check-coverage main.js
172-
# ../../node_modules/.bin/check-coverage second.js
173-
# ../../node_modules/.bin/check-coverage not-covered.js
174-
# ../../node_modules/.bin/only-covered --from coverage/coverage-final.json main.js second.js not-covered.js
175-
# working_directory: test-apps/old-cypress-config/all-files
176141

177-
# - publish:
178-
# filters:
179-
# branches:
180-
# only:
181-
# - master
182-
# - beta
183-
# requires:
184-
# - unit
185-
# - backend coverage
186-
# - fullstack coverage
187-
# - example-before-each-visit
188-
# - example-before-all-visit
189-
# - example-ts-example
190-
# - example-same-folder
191-
# - example-support-files
192-
# - example-use-plugins-and-support
193-
# - example-exclude-files
194-
# - example-docker-paths
195-
# - example-use-webpack
196-
# - example-all-files
197-
# - example-unit-tests-js
198-
# - Windows test
142+
- cypress/run:
143+
name: Windows test
144+
executor:
145+
# executor comes from the "windows" orb
146+
name: win/default
147+
shell: bash.exe
148+
no-workspace: true
149+
start: npm run start:windows --prefix test-apps/old-cypress-config/all-files
150+
wait-on: 'http://localhost:1234'
151+
command: npx cypress run --project test-apps/old-cypress-config/all-files
152+
# store screenshots and videos
153+
store_artifacts: true
154+
cache-key: 'cache-{{ arch }}-{{ .Branch }}-{{ checksum "package-lock.json" }}'
155+
post-checkout:
156+
- run:
157+
name: Install node 16
158+
command: nvm install 16.13.2
159+
- run:
160+
name: Use node 16
161+
command: nvm use 16.13.2
162+
- run:
163+
name: Install deps for code coverage
164+
command: npm ci
165+
post-install:
166+
- run:
167+
name: Install deps for test-apps/old-cypress-config
168+
command: npm ci
169+
working_directory: test-apps/old-cypress-config
170+
post-steps:
171+
# store the created coverage report folder
172+
# you can click on it in the CircleCI UI
173+
# to see live static HTML site
174+
- store_artifacts:
175+
path: test-apps/old-cypress-config/all-files/coverage
176+
# make sure the examples captures 100% of code
177+
- run:
178+
name: Verify Code Coverage
179+
command: npm run coverage:verify
180+
working_directory: test-apps/old-cypress-config/all-files
181+
- run:
182+
name: Check code coverage files 📈
183+
# we will check the final coverage report
184+
# to make sure it only has files we are interested in
185+
# because there are files covered at 0 in the report
186+
command: npm i -D check-code-coverage && npm run coverage:check-files:windows
187+
working_directory: test-apps/old-cypress-config/all-files
188+
189+
- publish:
190+
filters:
191+
branches:
192+
only:
193+
- master
194+
- beta
195+
- next
196+
- dev
197+
requires:
198+
- lint
199+
- test-code-coverage-plugin
200+
- test-old-cypress-config/all-files
201+
- test-old-cypress-config/backend
202+
- test-old-cypress-config/before-all-visit
203+
- test-old-cypress-config/before-each-visit
204+
- test-old-cypress-config/exclude-files
205+
- test-old-cypress-config/frontend
206+
- test-old-cypress-config/fullstack
207+
- test-old-cypress-config/one-spec
208+
- test-old-cypress-config/same-folder
209+
- test-old-cypress-config/support-files
210+
- test-old-cypress-config/ts-example
211+
- test-old-cypress-config/unit-tests-js
212+
- test-old-cypress-config/use-webpack
213+
- test-new-cypress-config/all-files
214+
- test-new-cypress-config/backend
215+
- test-new-cypress-config/before-all-visit
216+
- test-new-cypress-config/before-each-visit
217+
- test-new-cypress-config/exclude-files
218+
- test-new-cypress-config/frontend
219+
- test-new-cypress-config/fullstack
220+
- test-new-cypress-config/one-spec
221+
- test-new-cypress-config/same-folder
222+
- test-new-cypress-config/support-files
223+
- test-new-cypress-config/ts-example
224+
- test-new-cypress-config/unit-tests-js
225+
- test-new-cypress-config/use-webpack
226+
- Windows test

.releaserc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"branches": [
3+
"master",
4+
"next",
5+
{
6+
"name": "besta",
7+
"prerelease": true
8+
},
9+
{
10+
"name": "dev",
11+
"prerelease": true
12+
}
13+
]
14+
}

test-apps/old-cypress-config/all-files/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"pretest": "rimraf .nyc_output .cache coverage dist",
1010
"test": "../node_modules/.bin/start-test 1234 cy:run",
1111
"coverage:verify": "npx nyc report --check-coverage true --lines 100",
12-
"coverage:check-files": "../node_modules/.bin/check-coverage main.js && ../node_modules/.bin/check-coverage second.js && ../node_modules/.bin/check-coverage not-covered.js && ../node_modules/.bin/only-covered --from coverage/coverage-final.json main.js second.js not-covered.js"
12+
"coverage:check-files": "../node_modules/.bin/check-coverage main.js && ../node_modules/.bin/check-coverage second.js && ../node_modules/.bin/check-coverage not-covered.js && ../node_modules/.bin/only-covered --from coverage/coverage-final.json main.js second.js not-covered.js",
13+
"coverage:check-files:windows": "check-coverage main.js && check-coverage second.js && check-coverage not-covered.js && only-covered --from coverage/coverage-final.json main.js second.js not-covered.js"
1314
},
1415
"nyc": {
1516
"all": true,

0 commit comments

Comments
 (0)