diff --git a/.github/workflows/generate-allure-report.yml b/.github/workflows/generate-allure-report.yml index 5b4303fd504..0432865f2e7 100644 --- a/.github/workflows/generate-allure-report.yml +++ b/.github/workflows/generate-allure-report.yml @@ -87,7 +87,8 @@ jobs: generate-allure-report: name: Generate allure report runs-on: ubuntu-latest - needs: [generate-test-reports] + needs: generate-test-reports + if: always() && needs.generate-test-reports.result == 'success' steps: - uses: actions/checkout@v4 @@ -129,13 +130,12 @@ jobs: with: message: | ${{ steps.allure.outputs.test_result_icon }} [Test Report](${{ steps.allure.outputs.report_url }}) | ${\color{lightgreen}Pass: ${{ steps.allure.outputs.test_result_passed }}/${{ steps.allure.outputs.test_result_total }}}$ | ${\color{red}Fail: ${{ steps.allure.outputs.test_result_failed }}/${{ steps.allure.outputs.test_result_total }}}$ | - comment_tag: allure_report mode: upsert generate-coverage-report: name: Generate coverage report runs-on: ubuntu-latest - needs: [generate-test-reports] + needs: generate-test-reports steps: - uses: actions/checkout@v4 @@ -194,8 +194,8 @@ jobs: upload-coverage-report: name: Upload coverage report - needs: [generate-coverage-report] - if: ${{ always() }} + needs: generate-coverage-report + if: always() runs-on: ubuntu-latest steps: - name: Coveralls Finished diff --git a/.github/workflows/nightly-ci.yml b/.github/workflows/nightly-ci.yml index 99f04704940..b1e10fb0045 100644 --- a/.github/workflows/nightly-ci.yml +++ b/.github/workflows/nightly-ci.yml @@ -5,7 +5,6 @@ on: - cron: '0 0 * * *' # Runs every day at 00:00 workflow_dispatch: - permissions: id-token: write contents: write @@ -16,63 +15,55 @@ concurrency: cancel-in-progress: true env: - AWS_REGION: eu-central-1 - AWS_ROLE_ARN: arn:aws:iam::332405224602:role/ci - EARTHLY_TARGET: docker - ECR_REGISTRY: 332405224602.dkr.ecr.eu-central-1.amazonaws.com REPORT_EXT: .junit-report.xml ALLURE_REPORT_PATH: nightly-allure-report jobs: ci_nightly: - uses: input-output-hk/catalyst-ci/.github/workflows/ci.yml@master + uses: input-output-hk/catalyst-forge/.github/workflows/ci.yml@ci/v1.7.0 with: - aws_ecr_registry: 332405224602.dkr.ecr.eu-central-1.amazonaws.com - aws_role_arn: arn:aws:iam::332405224602:role/ci - aws_region: eu-central-1 + forge_version: 0.10.0 nightly: true - secrets: - dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} - dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} - earthly_runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }} - earthly_runner_secret: ${{ secrets.EARTHLY_RUNNER_SECRET }} generate-test-reports: name: Generate test reports runs-on: ubuntu-latest + if: always() + needs: ci_nightly steps: - uses: actions/checkout@v4 - - name: Setup CI - uses: input-output-hk/catalyst-ci/actions/setup@master + - name: Install Forge + uses: input-output-hk/catalyst-forge/actions/install@ci/v1.7.0 with: - aws_role_arn: ${{ env.AWS_ROLE_ARN }} - aws_region: ${{ env.AWS_REGION }} - earthly_runner_secret: ${{ secrets.EARTHLY_RUNNER_SECRET }} + version: 0.10.0 + + - name: Setup CI + uses: input-output-hk/catalyst-forge/actions/setup@ci/v1.7.0 - name: Get python api test report - uses: input-output-hk/catalyst-ci/actions/run@master + uses: input-output-hk/catalyst-forge/actions/run@ci/v1.7.0 if: always() continue-on-error: true with: - earthfile: ./catalyst-gateway/tests/api_tests/ - flags: --allow-privileged - targets: nightly-test - target_flags: - runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }} - artifact: "false" + command: run + args: ./catalyst-gateway/tests/api_tests+nightly-test - name: Get cardano wallet integration test report - uses: input-output-hk/catalyst-ci/actions/run@master + uses: input-output-hk/catalyst-forge/actions/run@ci/v1.7.0 if: always() continue-on-error: true with: - earthfile: ./catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/wallet-automation/ - flags: --allow-privileged - targets: nightly-test - target_flags: - runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }} - artifact: "false" + command: run + args: ./catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/wallet-automation+nightly-test + + - name: Get schemathesis test report + uses: input-output-hk/catalyst-forge/actions/run@ci/v1.7.0 + if: always() + continue-on-error: true + with: + command: run + args: ./catalyst-gateway/tests/schemathesis_tests+nightly-test-fuzzer-api - name: Collect and upload test reports uses: actions/upload-artifact@v4 @@ -85,7 +76,8 @@ jobs: generate-allure-report: name: Generate allure report runs-on: ubuntu-latest - needs: [generate-test-reports] + needs: generate-test-reports + if: always() && needs.generate-test-reports.result == 'success' steps: - uses: actions/checkout@v4 @@ -118,7 +110,7 @@ jobs: repository: gh-pages-dir branch: gh-pages pull_args: --rebase -X ours - + - name: Send Slack notification if: ${{ always() && steps.allure.outputs.report_url }} uses: slackapi/slack-github-action@v2.0.0 @@ -127,5 +119,5 @@ jobs: { "text": ":rocket: *Test Report*\n<${{ steps.allure.outputs.report_url }}|Click here to view the Allure report>\n*Passed:* ${{ steps.allure.outputs.test_result_passed }}/ ${{ steps.allure.outputs.test_result_total }}\n*Failed:* ${{ steps.allure.outputs.test_result_failed }}/ ${{ steps.allure.outputs.test_result_total }}" } - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file + webhook: ${{ secrets.SLACK_WEBHOOK_URL }} + webhook-type: webhook-trigger diff --git a/catalyst-gateway/tests/schemathesis_tests/.gitignore b/catalyst-gateway/tests/schemathesis_tests/.gitignore index 12e88d03ad5..c31c5f9b125 100644 --- a/catalyst-gateway/tests/schemathesis_tests/.gitignore +++ b/catalyst-gateway/tests/schemathesis_tests/.gitignore @@ -1,3 +1,4 @@ __pycache__ .hypothesis/ -cassette.yaml \ No newline at end of file +cassette.yaml +*.zst \ No newline at end of file diff --git a/catalyst-gateway/tests/schemathesis_tests/Earthfile b/catalyst-gateway/tests/schemathesis_tests/Earthfile index f5cdb0f9a4c..cd48457d8fd 100644 --- a/catalyst-gateway/tests/schemathesis_tests/Earthfile +++ b/catalyst-gateway/tests/schemathesis_tests/Earthfile @@ -95,7 +95,7 @@ nightly-package-schemathesis: # nightly-test-fuzzer-api - Fuzzy test cat-gateway using openapi specs. nightly-test-fuzzer-api: FROM earthly/dind:alpine-3.19-docker-25.0.5-r0 - RUN apk update && apk add iptables-legacy curl # workaround for https://github.com/earthly/earthly/issues/3784 + RUN apk update && apk add iptables-legacy curl zstd # workaround for https://github.com/earthly/earthly/issues/3784 COPY schemathesis-docker-compose.yml . LET api_spec="http://0.0.0.0:3030/docs/cat-gateway.json" ARG seed @@ -111,11 +111,13 @@ nightly-test-fuzzer-api: RUN --no-cache docker run --net=host --name=st schemathesis:latest || echo fail > fail; \ docker cp st:/results/junit-report.xml junit-report.xml && \ - docker cp st:/results/cassette.yaml cassette.yaml + docker cp st:/results/cassette.yaml cassette.yaml && \ + docker-compose logs cat-gateway > ./cat-gateway.log && zstd -9 cat-gateway.log END WAIT SAVE ARTIFACT junit-report.xml AS LOCAL schemathesis-nightly.junit-report.xml SAVE ARTIFACT cassette.yaml AS LOCAL cassette.yaml + SAVE ARTIFACT cat-gateway.log.zst AS LOCAL cat-gateway.log.zst END IF [ -f fail ] RUN --no-cache echo "Nightly schemathesis test failed. Check the logs for more details" && \ diff --git a/catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/wallet-automation/blueprint.cue b/catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/wallet-automation/blueprint.cue index cb4463fa634..0ef883a1681 100644 --- a/catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/wallet-automation/blueprint.cue +++ b/catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/wallet-automation/blueprint.cue @@ -1,2 +1,9 @@ version: "1.0.0" -project: name: "voices-wallet-automation-test" +project: { + name: "voices-wallet-automation-test" + ci: { + targets: { + "nightly-test": privileged: true + } + } +}