Files
mdsecheck/.github/workflows/ci.yml
2025-02-11 16:53:26 +02:00

45 lines
983 B
YAML

name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install the stable Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
- name: Run cargo fmt
run: cargo fmt -- --check
- name: Run cargo clippy
run: cargo clippy --release -- -D warnings
test:
name: test - ${{ matrix.platform }}
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ ubuntu-latest, macos-latest ]
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install the stable Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Run cargo test
run: cargo test --release