Skip to content

Commit

Permalink
tarpaulin
Browse files Browse the repository at this point in the history
  • Loading branch information
Szegoo committed Apr 16, 2024
1 parent 4f17264 commit 56d7491
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 5 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
fmt:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@v4
- uses: ./.github/actions/setup

- name: Setup SSH
Expand All @@ -38,7 +42,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@v4
- uses: ./.github/actions/setup

- name: Setup SSH
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Test coverage

on:
# Triggers the workflow on push or pull request events but only for the main branch
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
TARPAULIN_VERSION: 0.27.3

jobs:
coverage:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v4
- uses: ./.github/actions/setup

- name: Run cargo-tarpaulin
run: |
wget https://github.com/xd009642/tarpaulin/releases/download/${{ env.TARPAULIN_VERSION }}/cargo-tarpaulin-x86_64-unknown-linux-musl.tar.gz
tar -zxvf cargo-tarpaulin-x86_64-unknown-linux-musl.tar.gz -C $HOME/.cargo/bin
cargo tarpaulin --workspace \
-e regionx-node regionx-runtime \
--exclude-files **/mock.rs **/weights/* \
--out xml
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@v4
- uses: ./.github/actions/setup

- name: Setup SSH
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/try_runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@v4
- uses: ./.github/actions/setup

- name: Setup SSH
Expand Down

0 comments on commit 56d7491

Please sign in to comment.