Skip to content

Commit d58c821

Browse files
committed
update netlify dev
1 parent 9997873 commit d58c821

File tree

4 files changed

+25
-4
lines changed

4 files changed

+25
-4
lines changed

circle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
at: ~/
8585
- run:
8686
name: Netlify Build 🏗
87-
command: npx netlify build
87+
command: npm run netlify:build
8888
working_directory: tests/test-prebuild-only
8989
environment:
9090
DEBUG: netlify-plugin-cypress
@@ -110,7 +110,7 @@ jobs:
110110
at: ~/
111111
- run:
112112
name: Netlify Build 🏗
113-
command: npx netlify build
113+
command: npm run netlify:build
114114
working_directory: tests/test-netlify-dev
115115
environment:
116116
DEBUG: netlify-plugin-cypress

tests/test-netlify-dev/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# use Netlify dev command
2+
3+
These tests run:
4+
- [x] before the build
5+
- [ ] after the build
6+
- [ ] on deploy success
7+
8+
## Local build
9+
10+
Use command `DEBUG=netlify-plugin-cypress npm run netlify:build` to try the plugin locally

tests/test-netlify-dev/netlify.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ functions = "src/functions"
1212
CYPRESS_CACHE_FOLDER = "./node_modules/CypressBinary"
1313
# set TERM variable for terminal output
1414
TERM = "xterm"
15+
# do not print too many progress messages
16+
CI = "1"
1517

1618
[dev]
1719
command = "npx serve public"
@@ -32,9 +34,10 @@ TERM = "xterm"
3234
# and Netlify functions
3335
# let's run tests against Netlify Dev server
3436
[plugins.inputs.preBuild]
37+
enable = true
3538
start = 'npx netlify dev'
3639
wait-on = 'http://localhost:8888'
3740

38-
# and skip tests after building it
41+
# do no run tests after deploy
3942
[plugins.inputs]
40-
skip = true
43+
enable = false
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "prebuild-only-example",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"netlify:build": "../../node_modules/.bin/netlify build"
7+
}
8+
}

0 commit comments

Comments
 (0)