-
Notifications
You must be signed in to change notification settings - Fork 437
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate CI to CircleCI & SauceLabs (#823)
* Resolved race condition in golang test server * TravisCI -> CircleCI * BrowserStack -> SauceLabs * Simplified local and CI test scripts
- Loading branch information
1 parent
7c2c243
commit f9ddeb1
Showing
31 changed files
with
1,526 additions
and
1,894 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
version: 2.1 | ||
|
||
executors: | ||
test-executor: | ||
docker: | ||
- image: circleci/golang:1.15.2 | ||
auth: | ||
username: mydockerhub-user | ||
password: $DOCKERHUB_PASSWORD | ||
environment: | ||
PROTOTOOL_VER: 1.7.0 | ||
working_directory: /go/src/github.com/improbable-eng/grpc-web | ||
|
||
jobs: | ||
# This first job in the workflow optimises test time by combining the following: | ||
# * Linting | ||
# * Golang unit tests | ||
# * TypeScript unit tests | ||
# * Builds integration testserver binary | ||
# * Builds integration test Javascript bundles | ||
initial-unit-test-lint-prebuild: | ||
executor: test-executor | ||
steps: | ||
- checkout | ||
- run: sudo apt-get install unzip | ||
- run: . ./install-prototool.sh | ||
- run: echo 'export GOBIN=/go/bin' >> $BASH_ENV | ||
- run: go get -u golang.org/x/tools/cmd/goimports | ||
- run: go get -u github.com/robertkrimen/godocdown/godocdown | ||
- run: curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh | ||
- run: dep ensure | ||
- run: go install ./vendor/github.com/golang/protobuf/protoc-gen-go | ||
- run: export PATH=/go/src/github.com/improbable-eng/grpc-web/protobuf/bin:$PATH | ||
- run: | ||
command: | | ||
set +e | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.33.5/install.sh | bash | ||
export NVM_DIR="/home/circleci/.nvm" | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | ||
nvm install | ||
echo 'export NVM_DIR=$HOME/.nvm' >> $BASH_ENV | ||
echo 'source $NVM_DIR/nvm.sh' >> $BASH_ENV | ||
- run: npm install | ||
# Lint | ||
- run: ./lint-all.sh | ||
# Unit Tests | ||
- run: ./test-all.sh | ||
# Build server binary and Javascript bundles to be used across all subsequent browser tests | ||
- run: | ||
name: Pre-Build Integration Test | ||
command: npm run build:integration | ||
# Persisting the workspace allows the built assets to be used across the fan-out tests in the subsequent step | ||
- persist_to_workspace: | ||
root: /go/src/github.com/improbable-eng/grpc-web | ||
paths: | ||
- integration_test | ||
- client | ||
browser-tests: | ||
parameters: | ||
browser-params: | ||
type: string | ||
executor: test-executor | ||
steps: | ||
- checkout | ||
# Attaches the workspace from the previous step to retrieve the built assets for the tests | ||
- attach_workspace: | ||
at: /go/src/github.com/improbable-eng/grpc-web | ||
- run: sudo apt-get install moreutils | ||
# The two following hosts must match those in integration_test/hosts-config.ts | ||
- run: echo 127.0.0.1 testhost | sudo tee -a /etc/hosts | ||
- run: echo 127.0.0.1 corshost | sudo tee -a /etc/hosts | ||
- run: | ||
command: | | ||
set +e | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.33.5/install.sh | bash | ||
export NVM_DIR="/home/circleci/.nvm" | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | ||
nvm install | ||
echo 'export NVM_DIR=$HOME/.nvm' >> $BASH_ENV | ||
echo 'source $NVM_DIR/nvm.sh' >> $BASH_ENV | ||
- run: << parameters.browser-params >> npm run test:integration-browsers:ci | ||
- store_test_results: | ||
path: ./integration_test/test-results | ||
workflows: | ||
version: 2 | ||
test-workflow: | ||
jobs: | ||
- initial-unit-test-lint-prebuild | ||
- browser-tests: | ||
matrix: | ||
parameters: | ||
browser-params: | ||
- BROWSER=firefox80_win | ||
- BROWSER=firefox39_win | ||
- BROWSER=firefox38_win | ||
- BROWSER=firefox21_win | ||
- BROWSER=chrome_85 | ||
- BROWSER=chrome_52 | ||
- BROWSER=chrome_43 | ||
- BROWSER=chrome_42 | ||
- BROWSER=chrome_41 | ||
- BROWSER=edge85_win | ||
- BROWSER=edge16_win | ||
- BROWSER=edge14_win | ||
- BROWSER=edge13_win | ||
- BROWSER=safari13_1 SC_SSL_BUMPING=true DISABLE_WEBSOCKET_TESTS=true | ||
- BROWSER=safari12_1 SC_SSL_BUMPING=true DISABLE_WEBSOCKET_TESTS=true | ||
- BROWSER=safari11_1 SC_SSL_BUMPING=true DISABLE_WEBSOCKET_TESTS=true | ||
- BROWSER=safari10_1 SC_SSL_BUMPING=true DISABLE_WEBSOCKET_TESTS=true | ||
- BROWSER=safari9_1 SC_SSL_BUMPING=true DISABLE_WEBSOCKET_TESTS=true | ||
- BROWSER=safari8 SC_SSL_BUMPING=true DISABLE_WEBSOCKET_TESTS=true | ||
- BROWSER=ie11_win DISABLE_WEBSOCKET_TESTS=true | ||
- BROWSER=nodejs | ||
requires: | ||
- initial-unit-test-lint-prebuild |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
build-node/ | ||
build/ | ||
test-results/ | ||
sauce-connect-proxy/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.