Skip to content

ci: add llvm-tools

ci: add llvm-tools #2

Workflow file for this run

name: Build & Test Pop-CLI
on:
push:
branches: [ "main", "frank/code-coverage" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
GITHUB_ACTOR: pop-cli
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check formatting
run: cargo fmt --all -- --check
build:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/init"
with:
git-user: ${{ env.GITHUB_ACTOR }}
- name: Check Feature Contracts Excl.
run: cargo check --no-default-features --features contract
- name: Check Features Parachain Excl.
run: cargo check --no-default-features --features parachain
- name: Build default features
run: cargo build
unit-tests:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/init"
with:
git-user: ${{ env.GITHUB_ACTOR }}
- name: Run unit tests
run: cargo test --lib
coverage:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install LLVM Tools
run: rustup component add llvm-tools
- name: Install cargo-llvm-cov and cargo-make
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov,cargo-make
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Generate coverage
run: cargo make coverage
- name: Upload to codecov.io
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
contract-integration-tests:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/init"
with:
git-user: ${{ env.GITHUB_ACTOR }}
- name: Run integration tests
run: cargo test --no-default-features --features contract --test contract
parachain-integration-tests:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/init"
with:
git-user: ${{ env.GITHUB_ACTOR }}
- name: Run integration tests
run: cargo test --no-default-features --features parachain --test parachain