mirror of
https://github.com/robertwayne/axum-htmx
synced 2024-11-23 20:02:50 +01:00
49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
name: ci
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request: {}
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
toolchain:
|
|
- stable
|
|
- beta
|
|
- nightly
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: ${{ matrix.toolchain }}
|
|
components: clippy, rustfmt
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: run clippy
|
|
run: cargo clippy --all-features -- -D warnings
|
|
- name: run formatter checks
|
|
run: cargo fmt --all --check
|
|
|
|
test:
|
|
needs: check
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
toolchain:
|
|
- stable
|
|
- beta
|
|
- nightly
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: ${{ matrix.toolchain }}
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: run tests
|
|
run: cargo test --all-features
|