Skip to content

improve CI tests

improve CI tests #259

Workflow file for this run

on:
pull_request:
branches:
- main
push:
branches:
- main
name: Continuous integration
jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Rustfmt
run: cargo fmt --all -- --check
toml-sort:
name: TOML Sort check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Off-Narrative-Labs/toml_sort@v1
with:
all: true
match: "Cargo.toml"
test-core:
name: Test and Code Coverage for Tuxedo Core
needs: [fmt, toml-sort]
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test
with:
packages: tuxedo-core
title: "Code Coverage for Tuxedo Core"
test-parachain:
name: Test and Code Coverage for Tuxedo Parachain Core and Piece
needs: [fmt, toml-sort]
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: easimon/maximize-build-space@v10
- uses: actions/checkout@v4
- uses: ./.github/actions/test
with:
packages: tuxedo-parachain-core parachain-piece
ignore: tuxedo-core
title: "Code Coverage for Tuxedo Parachain Core and Piece"
test-runtime:
name: Test and Code Coverage for Tuxedo Template Runtime
needs: [fmt, toml-sort]
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test
with:
packages: tuxedo-template-runtime
ignore: tuxedo-core wardrobe
title: "Code Coverage for Tuxedo Template Runtime"
test-wardrobe:
name: Test and Code Coverage for Tuxedo Wardrobe Pieces
needs: [fmt, toml-sort]
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test
with:
packages: kitties money poe runtime-upgrade timestamp
ignore: tuxedo-core
title: "Code Coverage for Tuxedo Wardrobe Pieces"
clippy:
name: Clippy
needs: [fmt, toml-sort]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install tooling
run: sudo apt-get install -y protobuf-compiler && protoc --version
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
cache-targets: true
cache-on-failure: true
- name: Run Clippy
run: cargo clippy --no-deps -- -D warnings
wallet:
name: Wallet end-to-end test
needs: [fmt, toml-sort]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install tooling
run: sudo apt-get install -y protobuf-compiler && protoc --version
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
cache-targets: true
cache-on-failure: true
- name: Build
# We do not need the parachain node for the wallet test.
# However, this is more than merely an optimization.
# If we just `cargo build` the runtime will be incorrectly built with the parachain feature.
run: cargo build -p node-template -p tuxedo-template-wallet
- name: Run wallet test
run: ./wallet/test.sh