name: Checks
on:
push:
branches:
- main
pull_request: ~
jobs:
test:
name: Test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install latest stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
components: rustfmt,clippy
- name: Run rustfmt
run: cargo fmt --all --check
- name: Run clippy
uses: giraffate/clippy-action@v1
with:
reporter: 'github-pr-check'
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Run tests on each feature (excluding the helper features marked with `__`)
run: cargo hack --each-feature --skip __tls --skip __rustls test