parser/.github/workflows/tests.yml
azjezz 567532c84e
chore: remove just from CI
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-12-07 14:37:11 +01:00

49 lines
989 B
YAML

name: tests
on:
push:
branches: [main]
pull_request:
jobs:
tests:
name: tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
rust:
- 'stable'
- 'nightly'
os:
- 'ubuntu-latest'
steps:
- name: checkout
uses: actions/checkout@v3
- name: install rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- name: cache
uses: Swatinem/rust-cache@v2.0.0
- name: check
if: matrix.rust == 'stable'
run: |
cargo fmt --all -- --check
cargo clippy
- name: test
run: cargo test --all -- --skip third_party
- name: bench
if: matrix.rust == 'stable'
run: |
cargo install hyperfine
hyperfine --prepare "cargo build -r" --runs 10 --warmup 2 -i "cargo test --all -r"