Skip to content

Merge pull request #5 from polarity-lang/setup-ci #2

Merge pull request #5 from polarity-lang/setup-ci

Merge pull request #5 from polarity-lang/setup-ci #2

Workflow file for this run

name: Rust CI
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
permissions:
contents: read
statuses: write
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo check --all
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test --all
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: rustup component add rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: rustup component add clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all -- -D warnings