Skip to content

Commit

Permalink
configure ci (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
tjjfvi authored Sep 12, 2024
1 parent 7fa739a commit 9ccbec5
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 4 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Checks

on:
pull_request:
merge_group:
push:
branches:
- main

jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: dsherret/rust-toolchain-file@v1
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-check-${{ hashFiles('**/Cargo.lock') }}
- run: RUSTFLAGS="-D warnings" cargo check --all-targets

clippy:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: dsherret/rust-toolchain-file@v1
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-clippy-${{ hashFiles('**/Cargo.lock') }}
- run: RUSTFLAGS="-D warnings" cargo clippy --all-targets

test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: dsherret/rust-toolchain-file@v1
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-test-${{ hashFiles('**/Cargo.lock') }}
- run: SNAP_CHECK=1 cargo test

fmt:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: dsherret/rust-toolchain-file@v1
- run: cargo fmt --check

cspell:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: streetsidesoftware/cspell-action@v5
with:
incremental_files_only: false
config: ./cspell.json
files: |
**/*.rs
**/*.md
**/*.vi
**/*.iv
3 changes: 1 addition & 2 deletions cli/src/ivy_cli.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::fs;
use std::path::PathBuf;
use std::{fs, path::PathBuf};

use anyhow::Result;
use clap::{Args, Parser};
Expand Down
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"nonoverlapping",
"readback",
"repr",
"rotr",
"scrutinee",
"sixel",
"strs"
Expand Down
3 changes: 1 addition & 2 deletions ivm/src/stats.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use core::{
fmt::{self, Debug},
fmt::{Display, Write},
fmt::{self, Debug, Display, Write},
str,
time::Duration,
};
Expand Down
4 changes: 4 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[toolchain]
profile = "minimal"
channel = "nightly-2024-09-01"
components = ["rustfmt", "clippy", "miri"]

0 comments on commit 9ccbec5

Please sign in to comment.