Skip to content

Update actions workflow file #5935

Update actions workflow file

Update actions workflow file #5935

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
permissions:
checks: write
pull-requests: write
jobs:
contracts:
name: Contracts
uses: multiversx/mx-sc-actions/.github/workflows/[email protected]
with:
rust-toolchain: nightly-2023-12-11
path-to-sc-meta: framework/meta
mx-scenario-go-version: v2.1.0-alpha
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))
# which llvm-cov
# which llvm-profdata
- name: Run tests and generate report
env:
RUSTFLAGS: ""
run: |
./tests-coverage.sh
- 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