yewprint/.github/workflows/pr.yml

27 lines
701 B
YAML

name: PR
on:
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- run: cargo test --workspace --all-features --verbose
- uses: actions/checkout@v2
- run: rustup install --profile default nightly
# NOTE: we use nightly here to enable the options error_on_line_overflow and
# error_on_unformatted
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all --all-features --tests -- -D warnings
- run: cargo +nightly fmt -- --check