Skip to content

Commit

Permalink
Merge pull request #14 from trollup/ci
Browse files Browse the repository at this point in the history
Rust CI.
  • Loading branch information
Leo authored Jan 7, 2023
2 parents 3ab7a79 + 4d31fed commit a097961
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Rust

on:
push:
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: ⚡ Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
- name: Set up nightly
run: rustup default nightly
- name: Install dependencies
run: rustup component add clippy rustfmt
- name: Build sequencer
run: cd sequencer && cargo build --verbose
- name: Run sequencer tests
run: cd sequencer && cargo test --verbose
- name: Lint
run: cd sequencer && cargo clippy --all --all-features -- -D warnings
- name: Format
run: cd sequencer && cargo fmt --check --verbose
2 changes: 1 addition & 1 deletion sequencer/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2023-01-03"
channel = "nightly"

0 comments on commit a097961

Please sign in to comment.