-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Critical user flows testing against the real lightweight network + ES…
…M migration (#447) Co-authored-by: Yoni Mekuria <[email protected]>
- Loading branch information
Showing
56 changed files
with
7,003 additions
and
4,662 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,26 @@ | ||
{ | ||
"root": true, | ||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"jest": true | ||
}, | ||
"extends": ["eslint:recommended"], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest" | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"rules": { | ||
"no-constant-condition": "off" | ||
}, | ||
"ignorePatterns": [ | ||
"*.md", | ||
"**/*.css", | ||
"**/*.png", | ||
"**/*.svg", | ||
"**/*.woff", | ||
"**/*.woff2", | ||
"**/*.ico" | ||
] | ||
} |
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,65 @@ | ||
name: "Shared E2E testing steps" | ||
description: "Shared steps for the E2E testing jobs" | ||
inputs: | ||
node-version: | ||
description: "Node version" | ||
required: true | ||
os-type: | ||
description: "OS type" | ||
required: true | ||
shell: | ||
description: "Shell to use" | ||
required: true | ||
default: "bash" | ||
test-script: | ||
description: "Test script to run" | ||
required: false | ||
default: "npm run e2e:test" | ||
artifacts-prefix: | ||
description: "Job artifacts prefix" | ||
required: false | ||
default: "nightly-e2e-tests" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup NodeJS ${{ inputs.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
- name: Install Node dependencies, build and link the CLI app | ||
run: | | ||
npm ci | ||
npm run build --if-present | ||
npm link | ||
shell: ${{ inputs.shell }} | ||
- name: Install Playwright dependencies | ||
run: npm run e2e:install | ||
shell: ${{ inputs.shell }} | ||
- name: Configure Git | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "E2E Tests" | ||
shell: ${{ inputs.shell }} | ||
- name: Execute E2E tests on ${{ inputs.os-type }} | ||
run: ${{ inputs.test-script }} | ||
shell: ${{ inputs.shell }} | ||
env: | ||
CI: "true" | ||
- name: Upload Mina logs | ||
uses: actions/upload-artifact@v3 | ||
continue-on-error: true | ||
if: always() | ||
with: | ||
if-no-files-found: ignore | ||
name: mina-logs-${{ inputs.artifacts-prefix }}-node${{ inputs.node-version }}-${{ inputs.os-type }} | ||
path: /tmp/*.log | ||
retention-days: 5 | ||
- name: Upload E2E test artifacts | ||
uses: actions/upload-artifact@v3 | ||
continue-on-error: true | ||
if: always() | ||
with: | ||
if-no-files-found: ignore | ||
name: ${{ inputs.artifacts-prefix }}-report-node${{ inputs.node-version }}-${{ inputs.os-type }} | ||
path: reports/html-report/ | ||
retention-days: 30 |
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 @@ | ||
# | ||
# We want to fail fast but we don't want platform specific issues to impact other workflows. | ||
# So we extracted the tests into 3 separate jobs, one for each platform. | ||
# | ||
|
||
name: Nightly E2E tests (default branch) | ||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
workflow_dispatch: {} | ||
jobs: | ||
against-real-network-on-linux: | ||
timeout-minutes: 125 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
# https://github.com/shelljs/shelljs/issues/1133 | ||
node: [18, 20.6.1] | ||
os: [ubuntu-latest] | ||
services: | ||
mina-local-network: | ||
image: o1labs/mina-local-network:rampup-latest-lightnet | ||
env: | ||
NETWORK_TYPE: 'single-node' | ||
PROOF_LEVEL: 'none' | ||
ports: | ||
- 3085:3085 | ||
- 5432:5432 | ||
- 8080:8080 | ||
- 8181:8181 | ||
volumes: | ||
- /tmp:/root/logs | ||
steps: | ||
- name: Wait for Mina network readiness | ||
uses: o1-labs/wait-for-mina-network-action@v1 | ||
with: | ||
mina-graphql-port: 8080 | ||
max-attempts: 60 | ||
polling-interval-ms: 10000 | ||
- uses: actions/checkout@v3 | ||
- name: Use shared E2E testing steps | ||
uses: ./.github/actions/e2e-shared | ||
with: | ||
node-version: ${{ matrix.node }} | ||
os-type: ${{ matrix.os }} | ||
shell: bash | ||
against-mocked-network-on-macos: | ||
timeout-minutes: 95 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
# https://github.com/shelljs/shelljs/issues/1133 | ||
node: [18, 20.6.1] | ||
os: [macos-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use shared E2E testing steps | ||
uses: ./.github/actions/e2e-shared | ||
with: | ||
node-version: ${{ matrix.node }} | ||
os-type: ${{ matrix.os }} | ||
shell: bash | ||
against-mocked-network-on-windows: | ||
timeout-minutes: 95 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
# https://github.com/shelljs/shelljs/issues/1133 | ||
node: [18, 20.6.1] | ||
os: [windows-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use shared E2E testing steps | ||
uses: ./.github/actions/e2e-shared | ||
with: | ||
node-version: ${{ matrix.node }} | ||
os-type: ${{ matrix.os }} | ||
shell: powershell |
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,44 @@ | ||
name: Smoke E2E tests | ||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: {} | ||
jobs: | ||
against-real-network-on-linux: | ||
timeout-minutes: 30 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
# https://github.com/shelljs/shelljs/issues/1133 | ||
node: [18, 20.6.1] | ||
os: [ubuntu-latest] | ||
services: | ||
mina-local-network: | ||
image: o1labs/mina-local-network:rampup-latest-lightnet | ||
env: | ||
NETWORK_TYPE: 'single-node' | ||
PROOF_LEVEL: 'none' | ||
ports: | ||
- 3085:3085 | ||
- 5432:5432 | ||
- 8080:8080 | ||
- 8181:8181 | ||
volumes: | ||
- /tmp:/root/logs | ||
steps: | ||
- name: Wait for Mina network readiness | ||
uses: o1-labs/wait-for-mina-network-action@v1 | ||
with: | ||
mina-graphql-port: 8080 | ||
max-attempts: 60 | ||
polling-interval-ms: 10000 | ||
- uses: actions/checkout@v3 | ||
- name: Use shared E2E testing steps | ||
uses: ./.github/actions/e2e-shared | ||
with: | ||
node-version: ${{ matrix.node }} | ||
os-type: ${{ matrix.os }} | ||
shell: bash | ||
test-script: 'npm run e2e:test:smoke' | ||
artifacts-prefix: 'smoke-e2e-tests' |
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
Oops, something went wrong.