diff --git a/.github/workflows/rust_checks.yml b/.github/workflows/rust_checks.yml new file mode 100644 index 0000000..4e3dcea --- /dev/null +++ b/.github/workflows/rust_checks.yml @@ -0,0 +1,62 @@ +name: Rust CI + +on: + push: + branches: + - main + pull_request: + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: Build Project + run: cargo build --release + + check_fmt: + name: Check Formatting + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + components: rustfmt + override: true + - name: Check Formatting + run: cargo fmt --check + + lint: + name: Lint with Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + components: clippy + override: true + - name: Run Clippy on tests + run: cargo clippy --tests -- -D warnings + + test: + name: Run Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: Run Tests + run: cargo test diff --git a/.gitignore b/.gitignore index 5539f74..38708a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ /target -#.DS_Store -/.idea \ No newline at end of file +.DS_Store +/.idea