Workflow file for this run
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
name: Integration Chaos Test | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
push: | |
tags: | |
- "*" | |
workflow_dispatch: | |
env: | |
PLUGIN_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/plugin | |
ENV_JOB_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/plugin-tests:${{ github.sha }} | |
TEST_SUITE: chaos | |
TEST_ARGS: -test.timeout 1h | |
PLUGIN_COMMIT_SHA: ${{ github.sha }} | |
PLUGIN_ENV_USER: ${{ github.actor }} | |
TEST_LOG_LEVEL: debug | |
jobs: | |
build-plugin: | |
environment: integration | |
permissions: | |
id-token: write | |
contents: read | |
name: Build Plugin Image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Check if image exists | |
id: check-image | |
uses: goplugin/plugin-github-actions/docker/image-exists@92e0f299a87522c2a37bfc4686c4d8a96dc9d28b # v2.3.5 | |
with: | |
repository: plugin | |
tag: ${{ github.sha }} | |
AWS_REGION: ${{ secrets.QA_AWS_REGION }} | |
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | |
- name: Build Image | |
if: steps.check-image.outputs.exists == 'false' | |
uses: goplugin/plugin-github-actions/plugin-testing-framework/build-image@92e0f299a87522c2a37bfc4686c4d8a96dc9d28b # v2.3.5 | |
with: | |
cl_repo: goplugin/pluginv3.0 | |
cl_ref: ${{ github.sha }} | |
push_tag: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/plugin:${{ github.sha }} | |
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} | |
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | |
- name: Print Plugin Image Built | |
id: push | |
run: | | |
echo "### plugin node image tag used for this test run :link:" >>$GITHUB_STEP_SUMMARY | |
echo "\`${GITHUB_SHA}\`" >>$GITHUB_STEP_SUMMARY | |
- name: Collect Metrics | |
if: always() | |
id: collect-gha-metrics | |
uses: goplugin/push-gha-metrics-action@0281b09807758be1dcc41651e44e62b353808c47 # v2.1.0 | |
with: | |
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} | |
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} | |
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} | |
this-job-name: Build Plugin Image | |
continue-on-error: true | |
build-test-runner: | |
environment: integration | |
permissions: | |
id-token: write | |
contents: read | |
name: Build Test Runner Image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Build Test Image | |
uses: ./.github/actions/build-test-image | |
with: | |
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | |
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} | |
QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} | |
- name: Collect Metrics | |
if: always() | |
id: collect-gha-metrics | |
uses: goplugin/push-gha-metrics-action@0281b09807758be1dcc41651e44e62b353808c47 # v2.1.0 | |
with: | |
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} | |
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} | |
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} | |
this-job-name: Build Test Runner Image | |
continue-on-error: true | |
chaos-tests: | |
environment: integration | |
permissions: | |
checks: write | |
pull-requests: write | |
id-token: write | |
contents: read | |
name: EVM Pods Chaos Tests | |
runs-on: ubuntu-latest | |
needs: [build-test-runner, build-plugin] | |
steps: | |
- name: Collect Metrics | |
id: collect-gha-metrics | |
uses: goplugin/push-gha-metrics-action@0281b09807758be1dcc41651e44e62b353808c47 # v2.1.0 | |
with: | |
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} | |
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} | |
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} | |
this-job-name: EVM Pods Chaos Tests | |
test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}' | |
continue-on-error: true | |
- name: Checkout the repo | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Prepare Base64 TOML config | |
env: | |
PLUGIN_VERSION: ${{ github.sha }} | |
run: | | |
echo ::add-mask::$PLUGIN_IMAGE | |
cat << EOF > config.toml | |
[Network] | |
selected_networks=["SIMULATED"] | |
[PluginImage] | |
image="$PLUGIN_IMAGE" | |
version="$PLUGIN_VERSION" | |
EOF | |
BASE64_CONFIG_OVERRIDE=$(cat config.toml | base64 -w 0) | |
echo ::add-mask::$BASE64_CONFIG_OVERRIDE | |
echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV | |
- name: Run Tests | |
uses: goplugin/plugin-github-actions/plugin-testing-framework/run-tests@92e0f299a87522c2a37bfc4686c4d8a96dc9d28b # v2.3.5 | |
with: | |
test_command_to_run: cd integration-tests && go test -timeout 1h -count=1 -json -test.parallel 11 ./chaos 2>&1 | tee /tmp/gotest.log | gotestfmt | |
test_download_vendor_packages_command: cd ./integration-tests && go mod download | |
cl_repo: ${{ env.PLUGIN_IMAGE }} | |
cl_image_tag: ${{ github.sha }} | |
artifacts_location: ./integration-tests/chaos/logs | |
publish_check_name: EVM Pods Chaos Test Results | |
token: ${{ secrets.GITHUB_TOKEN }} | |
go_mod_path: ./integration-tests/go.mod | |
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} | |
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | |
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} | |
- name: Upload test log | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
if: failure() | |
with: | |
name: Test Results Log | |
path: /tmp/gotest.log | |
retention-days: 7 |