Merge pull request #6 from OneSignal/fix-deps #22
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: push | |
jobs: | |
tests: | |
name: Tests (Rust ${{ matrix.rustup-toolchain }}, Ruby ${{ matrix.ruby-version }}) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
rustup-toolchain: | |
- stable | |
- "1.65" | |
ruby-version: | |
- "3.0" | |
- "3.1" | |
- "3.2" | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Ruby and Rust | |
uses: oxidize-rb/actions/setup-ruby-and-rust@v1.1.9 | |
with: | |
rustup-toolchain: ${{ matrix.rustup-toolchain }} | |
ruby-version: ${{ matrix.ruby-version }} | |
cache-version: v2 | |
cargo-cache: true | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run tests | |
run: cargo test | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: clippy | |
override: true | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run Clippy | |
run: cargo clippy --no-deps -- -D warnings | |
rustfmt: | |
name: rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: rustfmt | |
override: true | |
- name: Check formatting | |
run: cargo fmt --all -- --check |