Skip to content

Merge pull request #6 from OneSignal/fix-deps #22

Merge pull request #6 from OneSignal/fix-deps

Merge pull request #6 from OneSignal/fix-deps #22

Workflow file for this run

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