Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add e2e testing support for ollinet in CI job #113

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/workflows/e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
options:
- local
- emerynet
- ollinet

concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label ||
Expand All @@ -32,7 +33,7 @@ jobs:
id-token: 'write'

env:
IS_EMERYNET_TEST: ${{ github.event_name == 'schedule' || inputs.network == 'emerynet' }}
IS_TESTNET_TEST: ${{ github.event_name == 'schedule' || inputs.network != 'local' }}

steps:
- name: Checkout
Expand All @@ -43,8 +44,8 @@ jobs:
docker compose -f tests/e2e/docker-compose.yml --profile $SYNPRESS_PROFILE up --build --exit-code-from synpress
env:
# conditionals based on github event
SYNPRESS_PROFILE: ${{ env.IS_EMERYNET_TEST == 'true' && 'daily-tests' || 'synpress' }}
CYPRESS_AGORIC_NET: ${{ env.IS_EMERYNET_TEST == 'true' && 'emerynet' || 'local' }}
SYNPRESS_PROFILE: ${{ env.IS_TESTNET_TEST == 'true' && 'daily-tests' || 'synpress' }}
CYPRESS_AGORIC_NET: ${{ inputs.network }}
# for docker-compose.yml
COMPOSE_DOCKER_CLI_BUILD: 1
DOCKER_BUILDKIT: 1
Expand All @@ -57,6 +58,8 @@ jobs:
GH_USERNAME: ${{ secrets.GH_USERNAME }}
GOV1_PHRASE: ${{ secrets.GOV1_PHRASE }}
GOV2_PHRASE: ${{ secrets.GOV2_PHRASE }}
OLLINET_GOV1_PHRASE: ${{ secrets.OLLINET_GOV1_PHRASE }}
OLLINET_GOV2_PHRASE: ${{ secrets.OLLINET_GOV2_PHRASE }}
# cypress dashboard
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
Expand All @@ -66,7 +69,7 @@ jobs:

- name: Archive e2e artifacts locally
uses: actions/upload-artifact@v3
if: ${{ env.IS_EMERYNET_TEST == 'false' && !cancelled()}}
if: ${{ env.IS_TESTNET_TEST == 'false' && !cancelled()}}
with:
name: e2e-artifacts
path: |
Expand All @@ -76,14 +79,14 @@ jobs:

- name: Archive e2e artifacts to GCS
uses: google-github-actions/upload-cloud-storage@v2
if: ${{ env.IS_EMERYNET_TEST == 'true' && !cancelled() }}
if: ${{ env.IS_TESTNET_TEST == 'true' && !cancelled() }}
with:
path: 'tests/e2e/docker'
destination: 'github-artifacts/${{ github.repository }}/${{ github.run_id }}/${{ github.event.repository.updated_at }}'
continue-on-error: true

- name: Log Path to GCS Artifacts
if: ${{ env.IS_EMERYNET_TEST == 'true' && !cancelled() }}
if: ${{ env.IS_TESTNET_TEST == 'true' && !cancelled() }}
run: echo "https://console.cloud.google.com/storage/browser/github-artifacts/${{ github.repository }}/${{ github.run_id }}/${{ github.event.repository.updated_at }}/docker/videos"

- name: Notify About Failure
Expand Down
3 changes: 3 additions & 0 deletions tests/e2e/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ services:
- CYPRESS_AGORIC_NET=${CYPRESS_AGORIC_NET}
- CYPRESS_GOV1_PHRASE=${GOV1_PHRASE}
- CYPRESS_GOV2_PHRASE=${GOV2_PHRASE}
- CYPRESS_OLLINET_GOV1_PHRASE=${OLLINET_GOV1_PHRASE}
- CYPRESS_OLLINET_GOV2_PHRASE=${OLLINET_GOV2_PHRASE}
- SECRET_WORDS="orbit bench unit task food shock brand bracket domain regular warfare company announce wheel grape trust sphere boy doctor half guard ritual three ecology"

depends_on:
- display
- video
Expand Down
8 changes: 8 additions & 0 deletions tests/e2e/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ export const phrasesList = {
gov1Phrase: Cypress.env('GOV1_PHRASE'),
gov2Phrase: Cypress.env('GOV2_PHRASE'),
},
ollinet: {
isLocal: false,
minutes: 3,
token: 'ToyUSD',
network: 'ollinet',
gov1Phrase: Cypress.env('OLLINET_GOV1_PHRASE'),
gov2Phrase: Cypress.env('OLLINET_GOV2_PHRASE'),
},
local: {
isLocal: true,
minutes: 1,
Expand Down
Loading