-
Notifications
You must be signed in to change notification settings - Fork 17
Feature/e2e-tests add e2e tests from sidechains-tests repository #162
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
Merged
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
15e024b
Feature/e2e-tests add e2e tests from sidechains-tests repository
ladamesny 6667810
Feature/e2e-tests remove midnight keys - add on push for staging
ladamesny 54ce245
Feature/e2e-tests small change for testing
ladamesny 5d6f2dd
Feature/e2e-tests change runs-on parameter
ladamesny c44ade4
fix: correct aws aws role cred
tgunnoe 1c98d10
Feature/e2e-tests update earthfile version for e2e tests
ladamesny e2ed3d8
Feature/e2e-tests update earthly set up
ladamesny d336266
Feature/e2e-tests fix reference to earthfile
ladamesny 6bb974b
Feature/e2e-tests add logging for directory
ladamesny 9dc1a68
Feature/e2e-tests add logging for directory
ladamesny 6119c23
Feature/e2e-tests find earthfile and use it
ladamesny 9d7d9c3
Feature/e2e-tests check branch
ladamesny af2e632
Feature/e2e-tests set correct branch
ladamesny b82c7e0
Feature/e2e-tests run earthly tests
ladamesny 819fcbd
feature/e2e-tests change runner to eks
ladamesny 9e8c9cd
feature/e2e-tests no satellites
ladamesny 7ca987e
feature/e2e-tests no satellites
ladamesny a758055
feature/e2e-tests no satellites
ladamesny 66ba0d5
feature/e2e-tests no satellites
ladamesny 0bef367
feature/e2e-test bring over updates from master
ladamesny 195c6a2
feature/e2e-test update devnet.yml
ladamesny 5fc6367
feature/e2e-test cd to e2e folder on devnet
ladamesny 5e99bad
feature/e2e-test fix tests for devnet
ladamesny 8f82fd7
feature/e2e-test set tests to run on master
ladamesny a9beb3e
feature/e2e-test remove midnight config
ladamesny fc15ae2
feature/e2e-test remove local env files
ladamesny 991a52d
feature/e2e-test remove encrypted local files
ladamesny c99dd2d
feature/e2e-test update staging config
ladamesny b5dcd33
feature/e2e-test remove atms-kind
ladamesny 797b45c
feature/e2e-tests remove unused file
ladamesny 080540f
feature/e2e-tests change keys for alice on local
ladamesny 079fcb5
ETCM-8525 update e2e tests for PR#335 pytest-multi-threads
ladamesny 860aab0
ETCM-8525 update e2e tests for PR#333 prepare v1.2.0 tag
ladamesny 1651ea7
ETCM-8525 update e2e tests for PR#336 feat: local-env 'tests' container
ladamesny 2578adc
ETCM-8525 update e2e tests for PR#338 add: deployment-mc-epoch arg op…
ladamesny eb118c7
ETCM-8525 fix init-timestamp argument
ladamesny ca8a586
fix alice keys - partner-chains-node-1
ladamesny 6d5a1a6
fix alice aura address - partner-chains-node-1
ladamesny d0e8bf1
fix alice aura sidechain skey - partner-chains-node-1
ladamesny 7d98dde
Merge branch 'master' into feature/e2e-tests
ladamesny File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,156 @@ | ||
name: Devnet Partner Chains Tests | ||
|
||
on: | ||
schedule: | ||
- cron: '30 4 * * *' | ||
workflow_dispatch: | ||
inputs: | ||
keyword: | ||
description: 'Run tests by keyword (-k)' | ||
type: string | ||
latest_mc_epoch: | ||
description: 'Parametrize committee tests to verify whole last MC epoch' | ||
type: boolean | ||
log_level: | ||
description: 'Log level' | ||
required: true | ||
default: 'info' | ||
type: choice | ||
options: | ||
- critical | ||
- error | ||
- warning | ||
- info | ||
- debug | ||
plan: | ||
description: 'XRay Test Plan' | ||
type: string | ||
required: false | ||
execution: | ||
description: 'XRay Test Execution' | ||
type: string | ||
required: false | ||
|
||
jobs: | ||
run: | ||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
runs-on: eks | ||
|
||
if: github.event.pull_request.draft == false | ||
|
||
env: | ||
TEST_ENVIRONMENT: devnet | ||
|
||
steps: | ||
- name: set ssh-agent to binary host | ||
uses: webfactory/ssh-agent@v0.8.0 | ||
with: | ||
ssh-private-key: ${{ secrets.SSH_KEY_BINARY_HOST }} | ||
|
||
- name: Acquire AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
role-to-assume: ${{ secrets.AWS_ROLE_ARN_ }} | ||
aws-region: "eu-central-1" | ||
|
||
- name: checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event_name == 'workflow_dispatch' && github.ref_name || 'v1.2.0' }} | ||
|
||
- name: Set deployment_version as env variable | ||
run: echo "DEPLOYMENT_VERSION=$(jq -r .deployment_version ./config/substrate/devnet_nodes.json)" >> $GITHUB_ENV | ||
|
||
- name: Set XRay variables | ||
run: | | ||
if [ ! -z "${{ inputs.plan }}" ]; then | ||
echo "TEST_PLAN=${{ inputs.plan }}" >> $GITHUB_ENV | ||
elif [ ! -z "${{ inputs.execution }}" ]; then | ||
echo "TEST_EXECUTION=${{ inputs.execution }}" >> $GITHUB_ENV | ||
else | ||
echo "TEST_PLAN=ETCM-7235" >> $GITHUB_ENV | ||
fi | ||
|
||
- name: set report_to_xray env variable | ||
run: | | ||
echo "REPORT_TO_XRAY=$([[ '${{ github.event_name }}' == 'schedule' || -n '${{ github.event.inputs.plan }}' || -n '${{ github.event.inputs.execution }}' ]] && echo true || echo false )" >> $GITHUB_ENV | ||
|
||
- name: install earthly | ||
uses: earthly/actions-setup@v1 | ||
with: | ||
github-token: ${{ github.token }} | ||
use-cache: true | ||
version: ^0.7.0 | ||
|
||
- name: run | ||
env: | ||
EARTHLY_BUILD_ARGS: "CI_RUN=true" | ||
FORCE_COLOR: 1 | ||
SLACK_REF_NAME: ${{ github.event_name == 'schedule' && format('{0}/v{1}', env.TEST_ENVIRONMENT, env.DEPLOYMENT_VERSION) || github.ref_name }} | ||
LOG_LEVEL: ${{ inputs.log_level }} | ||
KEYWORD: ${{ inputs.keyword }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
JOB_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
LATEST_MC_EPOCH: ${{ (inputs.latest_mc_epoch == true) && true || false }} | ||
REPORT_TO_SLACK: ${{ github.ref == 'refs/heads/master' && 'true' || 'false' }} | ||
GITHUB_ACTOR_USERNAME: ${{ github.event_name == 'schedule' && 'nightly' || github.actor }} | ||
XRAY_CLIENT_ID: ${{ secrets.XRAY_CLIENT_ID }} | ||
XRAY_CLIENT_SECRET: ${{ secrets.XRAY_CLIENT_SECRET }} | ||
XRAY_API_BASE_URL: ${{ secrets.XRAY_API_BASE_URL }} | ||
JIRA_URL: ${{ secrets.JIRA_URL }} | ||
MARKERS: "not active_flow and not passive_flow" | ||
run: | | ||
cd E2E-tests | ||
earthly \ | ||
--secret AWS_SESSION_TOKEN="$AWS_SESSION_TOKEN" \ | ||
--secret AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" \ | ||
--secret AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" \ | ||
--secret SLACK_WEBHOOK_URL="$SLACK_WEBHOOK_URL" \ | ||
--secret XRAY_CLIENT_ID="$XRAY_CLIENT_ID" \ | ||
--secret XRAY_CLIENT_SECRET="$XRAY_CLIENT_SECRET" \ | ||
--secret XRAY_API_BASE_URL="$XRAY_API_BASE_URL" \ | ||
--secret JIRA_URL="$JIRA_URL" \ | ||
--ssh-auth-sock="$SSH_AUTH_SOCK" \ | ||
+report \ | ||
--log_level="${LOG_LEVEL:-"info"}" \ | ||
--env=${{ env.TEST_ENVIRONMENT }} \ | ||
--stack=${{ env.TEST_ENVIRONMENT }} \ | ||
--keyword="${KEYWORD:-"test_"}" \ | ||
--repository ${{ github.repository }} \ | ||
--job_url="$JOB_URL" \ | ||
--slack_ref_name $SLACK_REF_NAME \ | ||
--latest_mc_epoch=$LATEST_MC_EPOCH \ | ||
--report_to_slack=$REPORT_TO_SLACK \ | ||
--github_actor_username="$GITHUB_ACTOR_USERNAME" \ | ||
--plan="$TEST_PLAN" \ | ||
--execution="$TEST_EXECUTION" \ | ||
--report_to_xray=$REPORT_TO_XRAY \ | ||
--decrypt=true \ | ||
--markers="$MARKERS" | ||
|
||
- name: Archive Debug Log | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: debug_log | ||
retention-days: 15 | ||
overwrite: true | ||
path: debug.log | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
if: ${{ !cancelled() }} | ||
with: | ||
node-version: 'latest' | ||
|
||
- name: Install Ctrf | ||
if: ${{ !cancelled() }} | ||
run: npm install github-actions-ctrf | ||
|
||
- name: Generate Summary Report | ||
if: ${{ !cancelled() }} | ||
run: | | ||
npx github-actions-ctrf ctrf-report.json |
This file contains hidden or 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,157 @@ | ||
name: Staging Partner Chains Tests | ||
|
||
on: | ||
schedule: | ||
- cron: '0 4 * * *' | ||
workflow_dispatch: | ||
inputs: | ||
keyword: | ||
description: 'Run tests by keyword (-k)' | ||
type: string | ||
latest_mc_epoch: | ||
description: 'Parametrize committee tests to verify whole last MC epoch' | ||
type: boolean | ||
log_level: | ||
description: 'Log level' | ||
required: true | ||
default: 'info' | ||
type: choice | ||
options: | ||
- critical | ||
- error | ||
- warning | ||
- info | ||
- debug | ||
plan: | ||
description: 'XRay Test Plan' | ||
type: string | ||
required: false | ||
execution: | ||
description: 'XRay Test Execution' | ||
type: string | ||
required: false | ||
|
||
jobs: | ||
run: | ||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
|
||
runs-on: eks | ||
|
||
if: github.event.pull_request.draft == false | ||
|
||
env: | ||
TEST_ENVIRONMENT: staging | ||
|
||
steps: | ||
- name: set ssh-agent to binary host | ||
uses: webfactory/ssh-agent@v0.8.0 | ||
with: | ||
ssh-private-key: ${{ secrets.SSH_KEY_BINARY_HOST }} | ||
|
||
- name: Acquire AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
role-to-assume: ${{ secrets.AWS_ROLE_ARN_ }} | ||
aws-region: "eu-central-1" | ||
|
||
- name: checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event_name == 'workflow_dispatch' && github.ref_name || 'v1.2.0' }} | ||
|
||
- name: Set deployment_version as env variable | ||
run: echo "DEPLOYMENT_VERSION=$(jq -r .deployment_version ./config/substrate/staging_nodes.json)" >> $GITHUB_ENV | ||
|
||
- name: Set XRay variables | ||
run: | | ||
if [ ! -z "${{ inputs.plan }}" ]; then | ||
echo "TEST_PLAN=${{ inputs.plan }}" >> $GITHUB_ENV | ||
elif [ ! -z "${{ inputs.execution }}" ]; then | ||
echo "TEST_EXECUTION=${{ inputs.execution }}" >> $GITHUB_ENV | ||
else | ||
echo "TEST_PLAN=ETCM-8452" >> $GITHUB_ENV | ||
fi | ||
|
||
- name: set report_to_xray env variable | ||
run: | | ||
echo "REPORT_TO_XRAY=$([[ '${{ github.event_name }}' == 'schedule' || -n '${{ github.event.inputs.plan }}' || -n '${{ github.event.inputs.execution }}' ]] && echo true || echo false )" >> $GITHUB_ENV | ||
|
||
- name: install earthly | ||
uses: earthly/actions-setup@v1 | ||
with: | ||
github-token: ${{ github.token }} | ||
use-cache: true | ||
version: ^0.7.0 | ||
|
||
- name: run | ||
env: | ||
EARTHLY_BUILD_ARGS: "CI_RUN=true" | ||
FORCE_COLOR: 1 | ||
SLACK_REF_NAME: ${{ github.event_name == 'schedule' && format('{0}/v{1}', env.TEST_ENVIRONMENT, env.DEPLOYMENT_VERSION) || github.ref_name }} | ||
LOG_LEVEL: ${{ inputs.log_level }} | ||
KEYWORD: ${{ inputs.keyword }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
JOB_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
LATEST_MC_EPOCH: ${{ (github.event.schedule || inputs.latest_mc_epoch == true) && true || false }} | ||
REPORT_TO_SLACK: ${{ github.ref == 'refs/heads/master' && 'true' || 'false' }} | ||
GITHUB_ACTOR_USERNAME: ${{ github.event_name == 'schedule' && 'nightly' || github.actor }} | ||
XRAY_CLIENT_ID: ${{ secrets.XRAY_CLIENT_ID }} | ||
XRAY_CLIENT_SECRET: ${{ secrets.XRAY_CLIENT_SECRET }} | ||
XRAY_API_BASE_URL: ${{ secrets.XRAY_API_BASE_URL }} | ||
JIRA_URL: ${{ secrets.JIRA_URL }} | ||
MARKERS: "not active_flow and not passive_flow" | ||
run: | | ||
cd E2E-tests | ||
earthly \ | ||
--secret AWS_SESSION_TOKEN="$AWS_SESSION_TOKEN" \ | ||
--secret AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" \ | ||
--secret AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" \ | ||
--secret SLACK_WEBHOOK_URL="$SLACK_WEBHOOK_URL" \ | ||
--secret XRAY_CLIENT_ID="$XRAY_CLIENT_ID" \ | ||
--secret XRAY_CLIENT_SECRET="$XRAY_CLIENT_SECRET" \ | ||
--secret XRAY_API_BASE_URL="$XRAY_API_BASE_URL" \ | ||
--secret JIRA_URL="$JIRA_URL" \ | ||
--ssh-auth-sock="$SSH_AUTH_SOCK" \ | ||
+report \ | ||
--log_level="${LOG_LEVEL:-"info"}" \ | ||
--env=${{ env.TEST_ENVIRONMENT }} \ | ||
--stack=${{ env.TEST_ENVIRONMENT }} \ | ||
--keyword="${KEYWORD:-"test_"}" \ | ||
--repository ${{ github.repository }} \ | ||
--job_url="$JOB_URL" \ | ||
--slack_ref_name $SLACK_REF_NAME \ | ||
--latest_mc_epoch=$LATEST_MC_EPOCH \ | ||
--report_to_slack=$REPORT_TO_SLACK \ | ||
--github_actor_username="$GITHUB_ACTOR_USERNAME" \ | ||
--plan="$TEST_PLAN" \ | ||
--execution="$TEST_EXECUTION" \ | ||
--report_to_xray=$REPORT_TO_XRAY \ | ||
--decrypt=true \ | ||
--markers="$MARKERS" | ||
|
||
- name: Archive Debug Log | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: debug_log | ||
retention-days: 15 | ||
overwrite: true | ||
path: debug.log | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
if: ${{ !cancelled() }} | ||
with: | ||
node-version: 'latest' | ||
|
||
- name: Install Ctrf | ||
if: ${{ !cancelled() }} | ||
run: npm install github-actions-ctrf | ||
|
||
- name: Generate Summary Report | ||
if: ${{ !cancelled() }} | ||
run: | | ||
npx github-actions-ctrf ctrf-report.json |
This file contains hidden or 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,10 @@ | ||
.obsidian | ||
**/__pycache__/ | ||
.decrypted~* | ||
*.decrypted | ||
venv/ | ||
contractlog.json | ||
reports | ||
debug.log | ||
.vscode/settings.json | ||
my_env/ |
This file contains hidden or 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,9 @@ | ||
creation_rules: | ||
- path_regex: secrets\/[^/]+\/[^l].*|secrets\/[^/]+\/l[^o].*|secrets\/[^/]+\/lo[^c].*|secrets\/[^/]+\/loc[^a].*|secrets\/[^/]+\/loca[^l].*|secrets\/[^/]+\/local[^/].* | ||
kms: >- | ||
arn:aws:kms:eu-central-1:689191102645:key/ca20bdac-ce35-4859-a2ef-e796df8d0abc | ||
pgp: >- | ||
15AC8EA84FC2A5AE768FFD753CEBBA453DE5BCFD, | ||
33E4D64843E72C6C8A665703199BE5B70A2AACE3, | ||
C5C51001A3BF0F4031C37EC99681FA65B010848C, | ||
3A10EB97F2C401D93CC4685D6B0DDB72B8DEA45D | ||
rsporny marked this conversation as resolved.
Show resolved
Hide resolved
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.