feat: add CI for testing and pre-compiled binaries #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [pull_request, push] | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Configure cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Test | |
run: cargo test | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Rust (nightly) | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- name: Run rustfmt | |
run: cargo fmt -- --check | |
- name: Setup Rust (stable) | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- name: Configure cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Run clippy | |
run: cargo clippy -- -D warnings |