yewprint/.github/workflows/rust.yml
2020-10-01 08:05:23 +02:00

36 lines
779 B
YAML

name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: cargo test --all-features --verbose
- run: cargo doc --verbose --all-features
checks:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- 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
- run: cargo +nightly fmt -- --check
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features -- -D warnings