mirror of
https://github.com/pezkuwichain/pezkuwi-runtime-templates.git
synced 2026-04-22 05:37:57 +00:00
Transition into monorepo (#180)
* evm template integrated * workflows modified per template * workflow fixes
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
name: "cargo tests"
|
||||
name: "evm template cargo tests"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- plain-cumulus-template
|
||||
paths-ignore:
|
||||
- "generic-template/**"
|
||||
- "**.md"
|
||||
- "**.adoc"
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "generic-template/**"
|
||||
- "**.md"
|
||||
- "**.adoc"
|
||||
workflow_dispatch:
|
||||
@@ -30,7 +31,7 @@ env:
|
||||
RUSTFLAGS: -C strip=symbols -C opt-level=s
|
||||
|
||||
jobs:
|
||||
clippy-fmt-test:
|
||||
evm-clippy-fmt-test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -44,6 +45,9 @@ jobs:
|
||||
os: macos-12
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./evm-template
|
||||
steps:
|
||||
- name: git checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -70,7 +74,7 @@ jobs:
|
||||
|
||||
- name: Run tests
|
||||
run: cargo test --release
|
||||
|
||||
|
||||
- name: Check benchmarking compilation
|
||||
run: cargo check --release --features runtime-benchmarks
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
name: "cargo tests"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- "evm-template/**"
|
||||
- "**.md"
|
||||
- "**.adoc"
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "evm-template/**"
|
||||
- "**.md"
|
||||
- "**.adoc"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
test-macos:
|
||||
description: "run tests on macOS"
|
||||
required: true
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
env:
|
||||
# Not needed in CI, should make things a bit faster
|
||||
CARGO_INCREMENTAL: 0
|
||||
CARGO_TERM_COLOR: always
|
||||
# Remove unnecessary WASM build artifacts
|
||||
WASM_BUILD_CLEAN_TARGET: 1
|
||||
# stripping symbols and optimizing for binary size
|
||||
RUSTFLAGS: -C strip=symbols -C opt-level=s
|
||||
|
||||
jobs:
|
||||
clippy-fmt-test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-22.04
|
||||
- macos-12
|
||||
run-all:
|
||||
- ${{ inputs.test-macos == true || github.ref == 'refs/heads/main' }}
|
||||
exclude: # exclude macos-12 when the condition is false
|
||||
- run-all: false
|
||||
os: macos-12
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./generic-template
|
||||
steps:
|
||||
- name: git checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: cd to `generic` template
|
||||
run: cd generic-template
|
||||
|
||||
- name: Install Protoc
|
||||
uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9 # v2.0.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: install rust toolchain
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
|
||||
- name: Install toml-sort
|
||||
run: cargo install --git https://github.com/4meta5/toml_sort
|
||||
- name: Add file permissions for toml-sort
|
||||
run: chmod +x ./scripts/toml-sort.sh
|
||||
- name: Add file permissions for check-toml-sorted
|
||||
run: chmod +x ./scripts/check-toml-sorted.sh
|
||||
- name: Check Cargo.toml files are formatted using toml_sort
|
||||
run: ./scripts/check-toml-sorted.sh
|
||||
|
||||
- name: Check format
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
- name: Run tests
|
||||
run: cargo test --release
|
||||
|
||||
- name: Check benchmarking compilation
|
||||
run: cargo check --release --features runtime-benchmarks
|
||||
|
||||
- name: Run tests with async backing
|
||||
run: cargo test --release --features="async-backing"
|
||||
|
||||
- name: Check clippy
|
||||
run: cargo clippy --release --locked --all-targets -- -D warnings
|
||||
|
||||
- name: Check Documentation
|
||||
run: cargo doc --release --locked --all --no-deps
|
||||
env:
|
||||
RUSTDOCFLAGS: "-D rustdoc::broken-intra-doc-links -D rustdoc::private_intra_doc_links"
|
||||
|
||||
- name: Upload coverage reports to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
Reference in New Issue
Block a user