Skip to content

Commit

Permalink
Add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mtshr committed Jun 11, 2024
1 parent 421d9bf commit ca386f0
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI

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

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings

jobs:
fmt:
name: Format
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: checkout
uses: actions/checkout@v4
- name: install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: cargo fmt
run: cargo fmt --all --check

clippy:
name: Clippy
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: checkout
uses: actions/checkout@v4
- name: install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: cargo clippy
run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic

tests:
name: Tests ${{matrix.rust}}
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, beta, nightly, 1.78.0]
timeout-minutes: 15
steps:
- name: checkout
uses: actions/checkout@v4
- name: install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
- name: cargo check
run: cargo check --workspace
- name: cargo test
run: cargo test

0 comments on commit ca386f0

Please sign in to comment.