axum-htmx/.github/workflows/ci.yml

50 lines
1.2 KiB
YAML
Raw Normal View History

2024-05-14 00:40:02 +02:00
name: ci
env:
CARGO_TERM_COLOR: always
on:
push:
branches:
- main
pull_request: {}
jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
2024-05-14 00:58:31 +02:00
# - stable
# - beta
2024-05-14 00:40:02 +02:00
- 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:
2024-05-14 00:58:31 +02:00
# - stable
# - beta
2024-05-14 00:40:02 +02:00
- 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