Skip to content

Commit

Permalink
fix: replace http-server with serve (#242)
Browse files Browse the repository at this point in the history
* fix: replace http-server with serve

* chore: add serve.json file with settings

* do not try to copy url on CI

* call start:ci on Circle

* use test:ci on other CIs

* use PORT to listen if specified

* separate Windows CI command

* add libgconf 2 for Ubuntu 16 on Travis
  • Loading branch information
bahmutov authored May 2, 2019
1 parent 3aa8d4d commit aaca096
Show file tree
Hide file tree
Showing 10 changed files with 510 additions and 173 deletions.
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ node_js:
# Node 10.3+ includes npm@6 which has good "npm ci" command
- 10.8

# if using Ubuntu 16 need this library
# https://github.com/cypress-io/cypress-documentation/pull/1647
addons:
apt:
packages:
- libgconf-2-4

cache:
# cache both npm modules and Cypress binary
directories:
Expand All @@ -17,7 +24,7 @@ defaults: &defaults
script:
# ## print all Travis environment variables for debugging
- $(npm bin)/print-env TRAVIS
- npm start -- --silent &
- npm run start:ci &
- npm run cy:run -- --record --parallel --group $STAGE_NAME
# after all tests finish running we need
# to kill all background jobs (like "npm start &")
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pipeline {
steps {
// start local server in the background
// we will shut it down in "post" command block
sh 'nohup npm start &'
sh 'nohup npm run start:ci &'
}
}

Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ test_script:
# with new version
- run-if npm run cy:version
- run-if npm run cy:verify
- run-if npm run test:ci:record
- run-if npm run test:ci:record:windows

# Don't actually build.
build: off
9 changes: 8 additions & 1 deletion basic/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ node_js:
# Node 10.3+ includes npm@6 which has good "npm ci" command
- 10.8

# if using Ubuntu 16 need this library
# https://github.com/cypress-io/cypress-documentation/pull/1647
addons:
apt:
packages:
- libgconf-2-4

cache:
# cache both npm modules and Cypress binary
directories:
Expand All @@ -16,7 +23,7 @@ cache:

script:
# start server in the background
- npm start -- --silent &
- npm run start:ci &
# run all Cypress tests and record on the dashboard
- npm run cy:run -- --record
# after all tests finish running we need
Expand Down
2 changes: 1 addition & 1 deletion basic/circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- ~/.cache
# start server before starting tests
- run:
command: npm start
command: npm run start:ci
background: true
- run: npm run e2e:record

Expand Down
6 changes: 3 additions & 3 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ workflows:
name: Mac test
executor: mac
build: 'npm run build'
start: 'npm start'
start: 'npm run start:ci'
record: true
group: 'Mac build'

Expand All @@ -58,7 +58,7 @@ workflows:
parallel: true # load balance all tests
parallelism: 3 # across 3 machines
group: '3x-electron' # name this group
start: 'npm start' # start server before running tests
start: 'npm run start:ci' # start server before running tests

# run on 2 machines using Chrome browser
- cypress/run:
Expand All @@ -75,7 +75,7 @@ workflows:
parallel: true
parallelism: 2
group: '2x-chrome'
start: 'npm start'
start: 'npm run start:ci'

- release:
filters:
Expand Down
Loading

0 comments on commit aaca096

Please sign in to comment.