Skip to content

Commit

Permalink
Update workflows with toolchain and vmtools
Browse files Browse the repository at this point in the history
  • Loading branch information
CostinCarabas committed Apr 9, 2024
1 parent 531ff92 commit f42a2da
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 8 deletions.
62 changes: 57 additions & 5 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [ main, feat/* ]
branches: [ main, feat/*, rc/* ]
pull_request:
branches: [ main, feat/* ]
branches: [ main, feat/*, rc/* ]
workflow_dispatch:

permissions:
Expand All @@ -20,9 +20,61 @@ permissions:
jobs:
contracts:
name: Contracts
uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v2
uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v2.3.5
with:
rust-toolchain: nightly-2022-12-08
vmtools-version: v1.4.60
rust-toolchain: nightly-2023-12-11
vmtools-version: v1.5.24
secrets:
token: ${{ secrets.GITHUB_TOKEN }}

# TEMPORARY: Remove this job when we can upgrade to mx-sc-actions v3+
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
target: wasm32-unknown-unknown

- 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))
cargo install multiversx-sc-meta --locked
- name: Run tests and generate report
env:
RUSTFLAGS: ""
run: |
sc-meta test-coverage --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
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:

jobs:
build:
uses: multiversx/mx-sc-actions/.github/workflows/[email protected].1
uses: multiversx/mx-sc-actions/.github/workflows/[email protected].5
with:
image_tag: v4.2.0
attach_to_existing_release: true
image_tag: v6.0.0
attach_to_existing_release: true

0 comments on commit f42a2da

Please sign in to comment.