From cb303813b635d9e8c04bb85750bbe7e0ff684655 Mon Sep 17 00:00:00 2001 From: Laurentiu Ciobanu Date: Tue, 26 Mar 2024 16:29:43 +0200 Subject: [PATCH 1/3] use shared sc-actions test-coverage job --- .github/workflows/actions.yml | 59 +++-------------------------------- 1 file changed, 4 insertions(+), 55 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index a2aa85a4ee..278e4e30df 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -14,63 +14,12 @@ permissions: jobs: contracts: name: Contracts - uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v3.0.0 + # uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v3.0.0 + uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@3c37e52a9de8f4111f823da0b2412f1fc55b7d30 with: rust-toolchain: nightly-2023-12-11 path-to-sc-meta: framework/meta mx-scenario-go-version: v2.1.0-alpha + coverage-args: --ignore-filename-regex='meta/src' --ignore-filename-regex='wasm-adapter' --ignore-filename-regex='benchmarks/' --ignore-filename-regex='tests/' --output ./coverage.md secrets: - token: ${{ secrets.GITHUB_TOKEN }} - - test_coverage: - name: Test Coverage - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Install rust - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - toolchain: nightly-2023-12-11 - - - name: Install prerequisites - run: | - rustup component add llvm-tools-preview - dirname $(find ~/.rustup -name llvm-cov) >> $GITHUB_PATH - - echo $(dirname $(find ~/.rustup -name llvm-cov)) - - - name: Run tests and generate report - env: - RUSTFLAGS: "" - run: | - cargo run --bin sc-meta test-coverage \ - --ignore-filename-regex='meta/src' \ - --ignore-filename-regex='wasm-adapter' \ - --ignore-filename-regex='benchmarks/' \ - --ignore-filename-regex='tests/' \ - --output ./coverage.md - - - name: Upload the report - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage.md - - - name: Find the comment containing the report - id: fc - uses: peter-evans/find-comment@v2 - if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository - with: - issue-number: ${{ github.event.pull_request.number }} - comment-author: "github-actions[bot]" - body-includes: "Coverage Summary" - - - name: Create or update the report comment - uses: peter-evans/create-or-update-comment@v2 - if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository - with: - comment-id: ${{ steps.fc.outputs.comment-id }} - issue-number: ${{ github.event.pull_request.number }} - body-file: ./coverage.md - edit-mode: replace + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 3d13acf947ef0863ec187dc042a1fdfbf947c574 Mon Sep 17 00:00:00 2001 From: Laurentiu Ciobanu Date: Wed, 27 Mar 2024 13:50:03 +0200 Subject: [PATCH 2/3] use shared sc-actions test-coverage job --- .github/workflows/actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 278e4e30df..eb494e8342 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -15,7 +15,7 @@ jobs: contracts: name: Contracts # uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v3.0.0 - uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@3c37e52a9de8f4111f823da0b2412f1fc55b7d30 + uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v3.1.0 with: rust-toolchain: nightly-2023-12-11 path-to-sc-meta: framework/meta From 493c865ac8dcd915d6a70c839cd5e07f906e62f0 Mon Sep 17 00:00:00 2001 From: Laurentiu Ciobanu Date: Wed, 27 Mar 2024 13:50:14 +0200 Subject: [PATCH 3/3] use shared sc-actions test-coverage job --- .github/workflows/actions.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index eb494e8342..d9d598ab33 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -14,7 +14,6 @@ permissions: jobs: contracts: name: Contracts - # uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v3.0.0 uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v3.1.0 with: rust-toolchain: nightly-2023-12-11