From 528ca1da38ac518963a01d3583ee6f58e25dd989 Mon Sep 17 00:00:00 2001 From: SotaTek-DuyLe Date: Fri, 5 Jul 2024 17:50:34 +0700 Subject: [PATCH 01/18] feat: add time triggered with setting nightly equals true --- .github/workflows/ci.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a83c0527f8..92d3d6bd4b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,8 @@ name: CI on: + schedule: + - cron: "0 0 * * *" push: permissions: @@ -15,8 +17,20 @@ jobs: 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 + 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 }} \ No newline at end of file + earthly_runner_secret: ${{ secrets.EARTHLY_RUNNER_SECRET }} + + nightly: + runs-on: ubuntu-latest + if: ${{ inputs.nightly == true }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Run example test + run: ./tests/schemathesis_tests/hooks/hooks.py \ No newline at end of file From d4d7ab215b820c234348249ab38b5d6b54e2ce4e Mon Sep 17 00:00:00 2001 From: SotaTek-DuyLe Date: Mon, 8 Jul 2024 15:44:42 +0700 Subject: [PATCH 02/18] fix: updated example test --- .github/workflows/ci.yml | 17 ++++++++++++++--- tests/example_test.py | 2 ++ 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 tests/example_test.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92d3d6bd4b7..2f3856e948b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: 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 - nightly: true + nightly: ${{ github.event_name == 'schedule' && github.event.schedule == '0 0 * * *' }} secrets: dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} @@ -26,11 +26,22 @@ jobs: nightly: runs-on: ubuntu-latest - if: ${{ inputs.nightly == true }} + if: ${{ github.event_name == 'schedule' && github.event.schedule == '0 0 * * *' }} steps: - name: Checkout repository uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.10 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install pytest - name: Run example test - run: ./tests/schemathesis_tests/hooks/hooks.py \ No newline at end of file + run: | + pytest tests/example_test.py \ No newline at end of file diff --git a/tests/example_test.py b/tests/example_test.py new file mode 100644 index 00000000000..725ed2e5fed --- /dev/null +++ b/tests/example_test.py @@ -0,0 +1,2 @@ +def test_example(): + assert 10 - 5 == 5 From 8a32985552104a37cf08e6cab35b400a2ec10d3e Mon Sep 17 00:00:00 2001 From: Dee Date: Tue, 9 Jul 2024 17:16:34 +0700 Subject: [PATCH 03/18] Create nightly-ci.yml --- .github/workflows/nightly-ci.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/nightly-ci.yml diff --git a/.github/workflows/nightly-ci.yml b/.github/workflows/nightly-ci.yml new file mode 100644 index 00000000000..8cf8e365235 --- /dev/null +++ b/.github/workflows/nightly-ci.yml @@ -0,0 +1,24 @@ +name: CI + +on: + schedule: + - cron: "* 10 * * *" //test - run every 10 mins + +permissions: + id-token: write + contents: write + packages: write + +jobs: + ci: + uses: input-output-hk/catalyst-ci/.github/workflows/ci.yml@master + 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 + 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 }} \ No newline at end of file From d25f498ced35f679a5c2be99cbfd955ff602b348 Mon Sep 17 00:00:00 2001 From: Dee Date: Tue, 9 Jul 2024 17:29:43 +0700 Subject: [PATCH 04/18] fix: name and cron --- .github/workflows/nightly-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly-ci.yml b/.github/workflows/nightly-ci.yml index 8cf8e365235..7a2f82e6d69 100644 --- a/.github/workflows/nightly-ci.yml +++ b/.github/workflows/nightly-ci.yml @@ -1,8 +1,8 @@ -name: CI +name: Nightly CI on: schedule: - - cron: "* 10 * * *" //test - run every 10 mins + - cron: '* 10 * * *' # Run every 10 mins permissions: id-token: write From 4bf368304b3e188e00d5e8f2e332d2d409d96057 Mon Sep 17 00:00:00 2001 From: Dee Date: Tue, 9 Jul 2024 17:45:24 +0700 Subject: [PATCH 05/18] fix: cron --- .github/workflows/nightly-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly-ci.yml b/.github/workflows/nightly-ci.yml index 7a2f82e6d69..07e558e3f6a 100644 --- a/.github/workflows/nightly-ci.yml +++ b/.github/workflows/nightly-ci.yml @@ -2,7 +2,7 @@ name: Nightly CI on: schedule: - - cron: '* 10 * * *' # Run every 10 mins + - cron: '* /5 * * *' # Run every 5 mins permissions: id-token: write From 75435cad226a08a03a5fef7a8a1025db7beae75d Mon Sep 17 00:00:00 2001 From: Dee Date: Tue, 9 Jul 2024 17:46:19 +0700 Subject: [PATCH 06/18] fix: cron --- .github/workflows/nightly-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly-ci.yml b/.github/workflows/nightly-ci.yml index 07e558e3f6a..2405660e0f7 100644 --- a/.github/workflows/nightly-ci.yml +++ b/.github/workflows/nightly-ci.yml @@ -2,7 +2,7 @@ name: Nightly CI on: schedule: - - cron: '* /5 * * *' # Run every 5 mins + - cron: '*/5 * * * *' # Run every 5 mins permissions: id-token: write From 97ae44b263051bee3b8b8f502cb09961ffbd4d1f Mon Sep 17 00:00:00 2001 From: Dee Date: Tue, 9 Jul 2024 18:16:17 +0700 Subject: [PATCH 07/18] fix: nightly --- .github/workflows/nightly-ci.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly-ci.yml b/.github/workflows/nightly-ci.yml index 2405660e0f7..8567222d7ba 100644 --- a/.github/workflows/nightly-ci.yml +++ b/.github/workflows/nightly-ci.yml @@ -1,8 +1,9 @@ -name: Nightly CI +name: CI nightly on: schedule: - - cron: '*/5 * * * *' # Run every 5 mins + - cron: '*/5 * * * *' # Runs every 5 mins + push: permissions: id-token: write @@ -12,6 +13,19 @@ permissions: jobs: ci: uses: input-output-hk/catalyst-ci/.github/workflows/ci.yml@master + 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 + 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 }} + + nightly: + uses: input-output-hk/catalyst-ci/.github/workflows/ci.yml@master + if: ${{ github.event_name == 'schedule' }} with: aws_ecr_registry: 332405224602.dkr.ecr.eu-central-1.amazonaws.com aws_role_arn: arn:aws:iam::332405224602:role/ci From 72ec37f7efbf5e22a589caf88981b5c57af83334 Mon Sep 17 00:00:00 2001 From: Dee Date: Tue, 9 Jul 2024 18:27:35 +0700 Subject: [PATCH 08/18] fix: revert ci.yml, create nightly-ci --- .github/workflows/ci.yml | 27 +-------------------------- .github/workflows/nightly-ci.yml | 18 ++---------------- 2 files changed, 3 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f3856e948b..6a83c0527f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,6 @@ name: CI on: - schedule: - - cron: "0 0 * * *" push: permissions: @@ -17,31 +15,8 @@ jobs: 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 - nightly: ${{ github.event_name == 'schedule' && github.event.schedule == '0 0 * * *' }} 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 }} - - nightly: - runs-on: ubuntu-latest - if: ${{ github.event_name == 'schedule' && github.event.schedule == '0 0 * * *' }} - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.10 - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install pytest - - - name: Run example test - run: | - pytest tests/example_test.py \ No newline at end of file + earthly_runner_secret: ${{ secrets.EARTHLY_RUNNER_SECRET }} \ No newline at end of file diff --git a/.github/workflows/nightly-ci.yml b/.github/workflows/nightly-ci.yml index 8567222d7ba..88b41b9e365 100644 --- a/.github/workflows/nightly-ci.yml +++ b/.github/workflows/nightly-ci.yml @@ -2,8 +2,7 @@ name: CI nightly on: schedule: - - cron: '*/5 * * * *' # Runs every 5 mins - push: + - cron: '*/2 * * * *' # Runs every 2 mins permissions: id-token: write @@ -11,21 +10,8 @@ permissions: packages: write jobs: - ci: + ci_nightly: uses: input-output-hk/catalyst-ci/.github/workflows/ci.yml@master - 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 - 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 }} - - nightly: - uses: input-output-hk/catalyst-ci/.github/workflows/ci.yml@master - if: ${{ github.event_name == 'schedule' }} with: aws_ecr_registry: 332405224602.dkr.ecr.eu-central-1.amazonaws.com aws_role_arn: arn:aws:iam::332405224602:role/ci From bbbfcddc508c7c99095bcc7ce3433c99234aec16 Mon Sep 17 00:00:00 2001 From: Dee Date: Tue, 9 Jul 2024 18:36:06 +0700 Subject: [PATCH 09/18] fix: cron value --- .github/workflows/nightly-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly-ci.yml b/.github/workflows/nightly-ci.yml index 88b41b9e365..cf8684f0016 100644 --- a/.github/workflows/nightly-ci.yml +++ b/.github/workflows/nightly-ci.yml @@ -2,7 +2,7 @@ name: CI nightly on: schedule: - - cron: '*/2 * * * *' # Runs every 2 mins + - cron: '0 0 * * *' # Runs every day at 00:00 permissions: id-token: write From 72bf79216b74294ef206d8698488b9424b822353 Mon Sep 17 00:00:00 2001 From: Dee Date: Tue, 9 Jul 2024 19:34:45 +0700 Subject: [PATCH 10/18] feat: add cron for testing purpose --- .github/workflows/nightly-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/nightly-ci.yml b/.github/workflows/nightly-ci.yml index cf8684f0016..21c6f6d788d 100644 --- a/.github/workflows/nightly-ci.yml +++ b/.github/workflows/nightly-ci.yml @@ -3,6 +3,7 @@ name: CI nightly on: schedule: - cron: '0 0 * * *' # Runs every day at 00:00 + - cron: '0 * * * *' # Run every hour, for testing purpose permissions: id-token: write From 625aa5126a13c7595c3f44446f91572446be8594 Mon Sep 17 00:00:00 2001 From: Dee Date: Tue, 9 Jul 2024 19:41:24 +0700 Subject: [PATCH 11/18] fix: remove example_test.py --- tests/example_test.py | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 tests/example_test.py diff --git a/tests/example_test.py b/tests/example_test.py deleted file mode 100644 index 725ed2e5fed..00000000000 --- a/tests/example_test.py +++ /dev/null @@ -1,2 +0,0 @@ -def test_example(): - assert 10 - 5 == 5 From 630d155f8267232e66cdf254532fc0e5cb4164e8 Mon Sep 17 00:00:00 2001 From: SotaTek-DuyLe Date: Wed, 10 Jul 2024 15:32:31 +0700 Subject: [PATCH 12/18] test: add get test report --- .github/workflows/nightly-ci.yml | 35 +++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightly-ci.yml b/.github/workflows/nightly-ci.yml index 21c6f6d788d..489cb7a6080 100644 --- a/.github/workflows/nightly-ci.yml +++ b/.github/workflows/nightly-ci.yml @@ -10,6 +10,13 @@ permissions: contents: write packages: write +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +env: + REPORT_EXT: .junit-report.xml + jobs: ci_nightly: uses: input-output-hk/catalyst-ci/.github/workflows/ci.yml@master @@ -22,4 +29,30 @@ jobs: dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} earthly_runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }} - earthly_runner_secret: ${{ secrets.EARTHLY_RUNNER_SECRET }} \ No newline at end of file + earthly_runner_secret: ${{ secrets.EARTHLY_RUNNER_SECRET }} + + nightly_tests: + name: Generate test reports + runs-on: ubuntu-latest + if: ${{ github.event_name == 'schedule' && github.event.schedule == '0 0 * * *'}} + + steps: + - uses: actions/checkout@v4 + + - name: Get test reports + uses: input-output-hk/catalyst-ci/actions/run@master + with: + earthfile: ./catalyst_voices/ + flags: + targets: test-unit + target_flags: + runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }} + artifact: "false" + + - name: Collect and upload test reports + uses: actions/upload-artifact@v4 + if: always() + with: + path: '**/*${{ env.REPORT_EXT }}' + if-no-files-found: error + retention-days: 1 \ No newline at end of file From 08602f911ac44bd900e901ffbbcc2552a45324b7 Mon Sep 17 00:00:00 2001 From: SotaTek-DuyLe Date: Wed, 10 Jul 2024 17:57:28 +0700 Subject: [PATCH 13/18] fix: remove check schedule --- .github/workflows/nightly-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/nightly-ci.yml b/.github/workflows/nightly-ci.yml index 489cb7a6080..15f87a4772c 100644 --- a/.github/workflows/nightly-ci.yml +++ b/.github/workflows/nightly-ci.yml @@ -34,7 +34,6 @@ jobs: nightly_tests: name: Generate test reports runs-on: ubuntu-latest - if: ${{ github.event_name == 'schedule' && github.event.schedule == '0 0 * * *'}} steps: - uses: actions/checkout@v4 From d59ed34bad2896e87c1eb91f50335d74bcb58dbb Mon Sep 17 00:00:00 2001 From: SotaTek-DuyLe Date: Wed, 10 Jul 2024 18:21:32 +0700 Subject: [PATCH 14/18] fix: update allure report path --- .github/workflows/generate-allure-report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate-allure-report.yml b/.github/workflows/generate-allure-report.yml index 89ec6926f55..4ac45d9d7be 100644 --- a/.github/workflows/generate-allure-report.yml +++ b/.github/workflows/generate-allure-report.yml @@ -19,7 +19,7 @@ env: AWS_ROLE_ARN: arn:aws:iam::332405224602:role/ci EARTHLY_TARGET: docker ECR_REGISTRY: 332405224602.dkr.ecr.eu-central-1.amazonaws.com - ALLURE_REPORT_PATH: allure-report + ALLURE_REPORT_PATH: allure-action-nightly REPORT_EXT: .junit-report.xml jobs: From 9ac340c48c07980b886026e00c68ed031b2c6d6f Mon Sep 17 00:00:00 2001 From: SotaTek-DuyLe Date: Wed, 10 Jul 2024 20:22:47 +0700 Subject: [PATCH 15/18] fix: add generate-report job in nightly-ci --- .github/workflows/generate-allure-report.yml | 2 +- .github/workflows/nightly-ci.yml | 105 +++++++++++++++++-- 2 files changed, 99 insertions(+), 8 deletions(-) diff --git a/.github/workflows/generate-allure-report.yml b/.github/workflows/generate-allure-report.yml index 4ac45d9d7be..89ec6926f55 100644 --- a/.github/workflows/generate-allure-report.yml +++ b/.github/workflows/generate-allure-report.yml @@ -19,7 +19,7 @@ env: AWS_ROLE_ARN: arn:aws:iam::332405224602:role/ci EARTHLY_TARGET: docker ECR_REGISTRY: 332405224602.dkr.ecr.eu-central-1.amazonaws.com - ALLURE_REPORT_PATH: allure-action-nightly + ALLURE_REPORT_PATH: allure-report REPORT_EXT: .junit-report.xml jobs: diff --git a/.github/workflows/nightly-ci.yml b/.github/workflows/nightly-ci.yml index 15f87a4772c..64d94177d78 100644 --- a/.github/workflows/nightly-ci.yml +++ b/.github/workflows/nightly-ci.yml @@ -16,6 +16,7 @@ concurrency: env: REPORT_EXT: .junit-report.xml + ALLURE_REPORT_PATH: nightly-allure-report jobs: ci_nightly: @@ -31,27 +32,117 @@ jobs: earthly_runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }} earthly_runner_secret: ${{ secrets.EARTHLY_RUNNER_SECRET }} - nightly_tests: + generate-test-reports: name: Generate test reports runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - - name: Get test reports + - name: Setup CI + uses: input-output-hk/catalyst-ci/actions/setup@master + with: + aws_role_arn: ${{ env.AWS_ROLE_ARN }} + aws_region: ${{ env.AWS_REGION }} + earthly_runner_secret: ${{ secrets.EARTHLY_RUNNER_SECRET }} + + - name: Get catalyst gateway unit test report + uses: input-output-hk/catalyst-ci/actions/run@master + if: always() + continue-on-error: true + with: + earthfile: ./catalyst-gateway/ + flags: + targets: build + target_flags: + runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }} + artifact: "false" + + - name: Get schemathesis test report uses: input-output-hk/catalyst-ci/actions/run@master + if: always() + continue-on-error: true with: - earthfile: ./catalyst_voices/ - flags: - targets: test-unit + earthfile: ./catalyst-gateway/tests/schemathesis_tests + flags: --allow-privileged + targets: test-fuzzer-api target_flags: runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }} artifact: "false" + + - name: Get flutter unit test report + uses: input-output-hk/catalyst-ci/actions/run@master + if: always() + continue-on-error: true + with: + earthfile: ./catalyst_voices/ + flags: + targets: test-unit + target_flags: + runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }} + artifact: "false" + - name: Get backend python test report + uses: input-output-hk/catalyst-ci/actions/run@master + if: always() + continue-on-error: true + with: + earthfile: ./catalyst-gateway/tests/api_tests/ + flags: --allow-privileged + targets: test + target_flags: + runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }} + artifact: "false" + - name: Collect and upload test reports uses: actions/upload-artifact@v4 if: always() with: path: '**/*${{ env.REPORT_EXT }}' if-no-files-found: error - retention-days: 1 \ No newline at end of file + retention-days: 1 + + generate-allure-report: + name: Generate allure report + runs-on: ubuntu-latest + needs: [generate-test-reports] + steps: + - uses: actions/checkout@v4 + + - uses: actions/download-artifact@v4 + + - name: Setup Allure report + run: | + mkdir -p ${{ env.ALLURE_REPORT_PATH }} + shopt -s globstar + cp **/*${{ env.REPORT_EXT }} ${{ env.ALLURE_REPORT_PATH }} + ls ${{ env.ALLURE_REPORT_PATH }} + + - name: Checkout gh-pages + uses: actions/checkout@v4 + with: + ref: gh-pages + path: gh-pages-dir + + - name: Build Allure report + uses: mgrybyk/allure-report-branch-action@v1 + id: allure + with: + report_id: 'test-report' + gh_pages: 'gh-pages-dir' + report_dir: ${{ env.ALLURE_REPORT_PATH }} + + - name: Git push to gh-pages + uses: mgrybyk/git-commit-pull-push-action@v1 + with: + repository: gh-pages-dir + branch: gh-pages + pull_args: --rebase -X ours + + - name: Comment PR with Allure report link + if: ${{ always() && github.event_name == 'pull_request' && steps.allure.outputs.report_url }} + uses: thollander/actions-comment-pull-request@v2 + 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 \ No newline at end of file From da698b9e0c96a9b042e643bb8f710a3dd5fde7d0 Mon Sep 17 00:00:00 2001 From: SotaTek-DuyLe Date: Thu, 11 Jul 2024 00:18:43 +0700 Subject: [PATCH 16/18] remove unnecessary jobs --- .github/workflows/nightly-ci.yml | 49 ++------------------------------ 1 file changed, 2 insertions(+), 47 deletions(-) diff --git a/.github/workflows/nightly-ci.yml b/.github/workflows/nightly-ci.yml index 64d94177d78..61779383f95 100644 --- a/.github/workflows/nightly-ci.yml +++ b/.github/workflows/nightly-ci.yml @@ -52,43 +52,7 @@ jobs: with: earthfile: ./catalyst-gateway/ flags: - targets: build - target_flags: - runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }} - artifact: "false" - - - name: Get schemathesis test report - uses: input-output-hk/catalyst-ci/actions/run@master - if: always() - continue-on-error: true - with: - earthfile: ./catalyst-gateway/tests/schemathesis_tests - flags: --allow-privileged - targets: test-fuzzer-api - target_flags: - runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }} - artifact: "false" - - - name: Get flutter unit test report - uses: input-output-hk/catalyst-ci/actions/run@master - if: always() - continue-on-error: true - with: - earthfile: ./catalyst_voices/ - flags: - targets: test-unit - target_flags: - runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }} - artifact: "false" - - - name: Get backend python test report - uses: input-output-hk/catalyst-ci/actions/run@master - if: always() - continue-on-error: true - with: - earthfile: ./catalyst-gateway/tests/api_tests/ - flags: --allow-privileged - targets: test + targets: nightly target_flags: runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }} artifact: "false" @@ -136,13 +100,4 @@ jobs: with: repository: gh-pages-dir branch: gh-pages - pull_args: --rebase -X ours - - - name: Comment PR with Allure report link - if: ${{ always() && github.event_name == 'pull_request' && steps.allure.outputs.report_url }} - uses: thollander/actions-comment-pull-request@v2 - 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 \ No newline at end of file + pull_args: --rebase -X ours \ No newline at end of file From 0e0eadc7957aa51b2f968d7d19c0ab31cee54b0b Mon Sep 17 00:00:00 2001 From: SotaTek-DuyLe Date: Thu, 11 Jul 2024 00:29:14 +0700 Subject: [PATCH 17/18] feat: add earthly nightly target --- catalyst-gateway/Earthfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/catalyst-gateway/Earthfile b/catalyst-gateway/Earthfile index a67645339d1..7099cab181e 100644 --- a/catalyst-gateway/Earthfile +++ b/catalyst-gateway/Earthfile @@ -49,6 +49,10 @@ build: SAVE ARTIFACT target/doc doc SAVE ARTIFACT target/release/cat-gateway cat-gateway +# build : Build the catalyst-gateway service. Used for nightly setup +nightly: + FROM +build + # all-hosts-build : Test which runs check with all supported host tooling. Needs qemu or rosetta to run. # Only used to validate tooling is working across host toolsets. all-hosts-build: From 7f71a5ec0651791d31d0ad72ccc65b9841d419e7 Mon Sep 17 00:00:00 2001 From: Dee Date: Thu, 11 Jul 2024 17:56:11 +0700 Subject: [PATCH 18/18] fix: earthly action --- catalyst-gateway/Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalyst-gateway/Earthfile b/catalyst-gateway/Earthfile index 7099cab181e..1123e284742 100644 --- a/catalyst-gateway/Earthfile +++ b/catalyst-gateway/Earthfile @@ -51,7 +51,7 @@ build: # build : Build the catalyst-gateway service. Used for nightly setup nightly: - FROM +build + BUILD +build # all-hosts-build : Test which runs check with all supported host tooling. Needs qemu or rosetta to run. # Only used to validate tooling is working across host toolsets.