Skip to content

Merge pull request #19 from gridsingularity/fix-node-tests #14

Merge pull request #19 from gridsingularity/fix-node-tests

Merge pull request #19 from gridsingularity/fix-node-tests #14

Workflow file for this run

name: GSy Node
on:
push:
paths:
- 'gsy-node/**'
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
check:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./gsy-node
steps:
- uses: actions/checkout@v2
- name: Set-Up
run: sudo apt install -y git clang curl libssl-dev llvm libudev-dev
- name: Install Rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source ~/.cargo/env
rustup default stable
rustup update nightly
rustup update stable
rustup target add wasm32-unknown-unknown --toolchain nightly
- name: Check Build
run: |
SKIP_WASM_BUILD=1 cargo check --release
- name: Check Build for Benchmarking
run: >
pushd node &&
cargo check --features=runtime-benchmarks --release
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set-Up
run: sudo apt install -y git clang curl libssl-dev llvm libudev-dev
- name: Install Rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source ~/.cargo/env
rustup default stable
rustup update nightly
rustup update stable
rustup target add wasm32-unknown-unknown --toolchain nightly
- name: Test
run: |
SKIP_WASM_BUILD=1 cargo test --manifest-path gsy-node/Cargo.toml --release
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path gsy-node/Cargo.toml --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: clippy
- name: Clippy
run: |
SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo clippy --manifest-path gsy-node/Cargo.toml --all-targets
coverage:
name: Code coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
target: wasm32-unknown-unknown
- name: Run cargo-tarpaulin
uses: actions-rs/[email protected]
with:
args: '--manifest-path gsy-node/Cargo.toml --ignore-tests'