Skip to content

Commit

Permalink
Added a different CI flow
Browse files Browse the repository at this point in the history
  • Loading branch information
jaytaph committed Sep 23, 2023
1 parent d3b4106 commit bd8dae7
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,42 @@
name: Rust CI
name: Rust

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

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
profile: minimal
components: rustfmt, clippy
- name: Cache Cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Cache target
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-target-${{ hashFiles('**/Cargo.lock') }}

- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Check formatting
run: cargo fmt -- --check
- name: Run Clippy
run: cargo clippy -- -D warnings

0 comments on commit bd8dae7

Please sign in to comment.