Skip to content

Merge pull request #43 from ChurchTao/v0.2.0 #79

Merge pull request #43 from ChurchTao/v0.2.0

Merge pull request #43 from ChurchTao/v0.2.0 #79

Workflow file for this run

name: Test
on:
push:
branches:
- master
paths:
- '.github/workflows/test.yml'
- 'src/**/*.rs'
- 'tests/**/*.rs'
- 'Cargo.toml'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- '**'
paths:
- '.github/workflows/test.yml'
- 'src/**/*.rs'
- 'tests/**/*.rs'
- 'Cargo.toml'
jobs:
rustfmt:
runs-on: ubuntu-22.04
steps:
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: rustfmt
- uses: actions/checkout@v4
- name: Check formatting
run: cargo fmt --all -- --check
clippy:
needs: rustfmt
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
# os: [macos-latest, windows-latest]
steps:
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: clippy
- uses: actions/checkout@v4
- name: Run `cargo clippy`
run: cargo clippy --all -- -D warnings
test:
needs: clippy
runs-on: ${{ matrix.os }}
strategy:
matrix:
# No Linux test for now as it just fails due to not having a desktop environment.
os: [macos-latest, windows-latest]
steps:
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Checkout
uses: actions/checkout@v4
- name: Run `cargo test`
run: cargo test --all