Skip to content

Commit

Permalink
feat: setup github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
morph-dev committed May 11, 2024
1 parent d96324a commit 9c62a3a
Showing 1 changed file with 104 additions and 0 deletions.
104 changes: 104 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Rust

on:
push:
branches:
- verkle
pull_request:
branches:
- verkle

jobs:
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt
- name: Cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.76.0
override: true
- name: Cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --workspace

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.76.0
override: true
components: clippy
- name: Cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all --all-targets --all-features --no-deps -- -D warnings

build:
name: Build Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.76.0
override: true
- name: Cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --release

test:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'true'
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.76.0
override: true
- name: Cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace

0 comments on commit 9c62a3a

Please sign in to comment.