Skip to content

Commit

Permalink
Add CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashtare committed Jan 22, 2024
1 parent 7fc3c3f commit f317e4b
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 1 deletion.
66 changes: 66 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Continuous Integration

on:
push:
branches: [main]
pull_request:
branches:
- "**"
workflow_dispatch:
branches:
- "**"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always

jobs:
test:
name: Test Suite
runs-on: ubuntu-latest
timeout-minutes: 30
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable

- name: Set up rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Run cargo test
run: cargo test --workspace
env:
RUSTFLAGS: -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0

lints:
name: Formatting and Clippy
runs-on: ubuntu-latest
timeout-minutes: 10
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy

- name: Set up rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Run cargo fmt
run: cargo fmt --all --check

- name: Run cargo clippy
run: cargo clippy --all-features --all-targets -- -D warnings -A incomplete-features
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
//! hash of the node it replaces.

#![allow(incomplete_features)]
#![feature(return_position_impl_trait_in_trait)]

pub mod nibbles;
pub mod partial_trie;
Expand Down

0 comments on commit f317e4b

Please sign in to comment.