-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING: use proxy for intercepting networks calls
- Loading branch information
Showing
76 changed files
with
25,906 additions
and
7,424 deletions.
There are no files selected for viewing
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,81 @@ | ||
name: E2E:Linux | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
e2e: | ||
if: "!contains(toJSON(github.event.commits.*.message), '[skip ci]')" | ||
|
||
runs-on: ubuntu-latest | ||
env: | ||
npm_config_prefix: ~/.npm | ||
DEBUG: cy2 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
cache: 'npm' | ||
cache-dependency-path: package-lock.json | ||
|
||
# remove cypress from peer dependecies | ||
- name: Install dependencies | ||
run: | | ||
npm install | ||
- name: Build | ||
run: npm run build | ||
|
||
- name: Setup | ||
run: npm uninstall cypress | ||
|
||
- name: Local - Setup | ||
working-directory: ./e2e | ||
run: npm install cypress --no-progress | ||
|
||
- name: Local - Test | ||
working-directory: ./e2e | ||
env: | ||
NODE_PATH: './node_modules' | ||
run: | | ||
node ./test-run.js | ||
node ./test-spawn.js run | ||
npm uninstall cypress | ||
- name: Local - Teardown | ||
working-directory: ./e2e | ||
run: npm uninstall cypress | ||
|
||
- name: Global - Setup | ||
run: npm install --global cypress --no-progress | ||
|
||
- name: Global - Test | ||
working-directory: ./e2e | ||
run: | | ||
NODE_PATH=$(npm prefix -g)/lib/node_modules node ./test-run.js | ||
NODE_PATH=$(npm prefix -g)/lib/node_modules node ./test-spawn.js run | ||
- name: Global - Teardown | ||
run: npm uninstall --global cypress | ||
|
||
- name: Custom - Setup | ||
env: | ||
npm_config_prefix: ~/.npm_custom | ||
run: | | ||
mkdir -p ~/.npm_custom | ||
npm install cypress --global | ||
- name: Custom - Test | ||
env: | ||
npm_config_prefix: ~/.npm_custom | ||
working-directory: ./e2e | ||
run: | | ||
NODE_PATH=$(npm prefix -g)/lib/node_modules CYPRESS_PACKAGE_SHELL_SCRIPT=$(npm prefix -g)/lib/node_modules/cypress/bin/cypress node ./test-spawn.js run | ||
- name: Custom - Teardown | ||
env: | ||
npm_config_prefix: ~/.npm_custom | ||
run: npm uninstall --global cypress |
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,64 @@ | ||
name: E2E:Network | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
e2e-network: | ||
if: "!contains(toJSON(github.event.commits.*.message), '[skip ci]')" | ||
|
||
runs-on: ubuntu-latest | ||
env: | ||
DEBUG: cy2*,cypress:server:cloud:*,cypress:network:* | ||
# prevent cypress ts-paths interfering with local imports | ||
TS_NODE_PROJECT: dummy.ts.json | ||
CYPRESS_API_URL: http://localhost:1234 | ||
|
||
# Service containers to run with `container-job` | ||
services: | ||
# Label used to access the service container | ||
director: | ||
# Docker Hub image | ||
image: agoldis/sorry-cypress-director | ||
ports: | ||
- 1234:1234 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
cache: 'npm' | ||
|
||
# remove cypress from peer dependecies | ||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Start Upstream Proxy | ||
run: | | ||
npm run build-tunnel | ||
node ./dist/tunnel-proxy.js & | ||
- name: Record without upstream proxy | ||
working-directory: ./e2e | ||
run: | | ||
../bin/cy2 run --parallel --record --key xxx | ||
- name: Record with upstream proxy | ||
working-directory: ./e2e | ||
env: | ||
HTTP_PROXY: https://localhost:9999 | ||
run: | | ||
../bin/cy2 run --parallel --record --key xxx | ||
- name: Bypass upstream proxy for director | ||
env: | ||
HTTP_PROXY: https://localhost:9999 | ||
NO_PROXY: localhost | ||
working-directory: ./e2e | ||
run: | | ||
../bin/cy2 run --parallel --record --key xxx |
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,92 @@ | ||
name: E2E:Windows | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
if: "!contains(toJSON(github.event.commits.*.message), '[skip ci]')" | ||
|
||
runs-on: windows-latest | ||
env: | ||
DEBUG: cy2 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
|
||
- name: Get npm cache directory | ||
id: npm-cache-dir | ||
shell: pwsh | ||
run: echo "dir=$(npm config get cache)" >> ${env:GITHUB_OUTPUT} | ||
|
||
- uses: actions/cache@v3 | ||
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true' | ||
with: | ||
path: ${{ steps.npm-cache-dir.outputs.dir }} | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
# remove cypress from peer dependecies | ||
- name: Install dependencies | ||
run: npm install | ||
npm uninstall cypress | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Setup | ||
run: npm uninstall cypress | ||
|
||
- name: Local - Setup | ||
working-directory: e2e | ||
run: npm install cypress --no-progress | ||
- name: Local - Test | ||
working-directory: e2e | ||
env: | ||
NODE_PATH: './node_modules' | ||
run: | | ||
node ./test-run.js run | ||
node ./test-spawn.js run | ||
npm uninstall cypress | ||
- name: Local - Teardown | ||
working-directory: e2e | ||
run: npm uninstall cypress | ||
|
||
- name: Global - Setup | ||
env: | ||
npm_config_prefix: ~/.npm with spaces | ||
run: npm install --global cypress --no-progress | ||
- name: Global - Test | ||
working-directory: e2e | ||
env: | ||
npm_config_prefix: ~/.npm with spaces | ||
run: | | ||
$prefix = npm prefix -g | ||
$env:NODE_PATH="$prefix\node_modules"; node .\test-run.js run | ||
$env:NODE_PATH="$prefix\node_modules"; node .\test-spawn.js run | ||
- name: Global - Teardown | ||
env: | ||
npm_config_prefix: ~/.npm with spaces | ||
run: npm uninstall --global cypress | ||
|
||
- name: Custom - Setup | ||
env: | ||
npm_config_prefix: ~/.npm_custom | ||
run: npm install cypress --global | ||
- name: Custom - Test | ||
working-directory: e2e | ||
env: | ||
npm_config_prefix: ~/.npm_custom | ||
run: | | ||
$prefix = npm prefix -g | ||
$env:NODE_PATH="$prefix\node_modules"; $env:CYPRESS_PACKAGE_SHELL_SCRIPT="$prefix\node_modules\cypress\bin\cypress"; node .\test-spawn.js run | ||
- name: Custom - Teardown | ||
env: | ||
npm_config_prefix: ~/.npm_custom | ||
run: npm uninstall --global cypress |
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,34 @@ | ||
name: Publish to GitHub | ||
|
||
on: | ||
push: | ||
branches: | ||
- release/* | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# Setup .npmrc file to publish to GitHub Packages | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
registry-url: 'https://npm.pkg.github.com' | ||
# scope: '@currents-dev' | ||
- run: npm ci | ||
# - run: ./scripts/rewrite_package.js | ||
- name: Release | ||
# only release npm package and create github release | ||
run: | | ||
git config user.name "${GITHUB_ACTOR}" | ||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
npm run release-ci | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Attach", | ||
"port": 9223, | ||
"request": "attach", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
"type": "node" | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Launch Program", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
"program": "${workspaceFolder}/dist", | ||
"preLaunchTask": "tsc: build - tsconfig.json", | ||
"outFiles": [ | ||
"${workspaceFolder}/dist/**/*.js" | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.