mirror of
https://github.com/danog/parser.git
synced 2024-12-02 17:38:16 +01:00
73fbc09114
Signed-off-by: azjezz <azjezz@protonmail.com>
50 lines
982 B
YAML
50 lines
982 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: install just and hyperfine
|
|
run: |
|
|
cargo install just
|
|
cargo install hyperfine
|
|
|
|
- name: cache
|
|
uses: Swatinem/rust-cache@v2.0.0
|
|
|
|
- name: check
|
|
if: matrix.rust == 'stable'
|
|
run: just lint
|
|
|
|
- name: test
|
|
run: just test
|
|
|
|
- name: bench
|
|
if: matrix.rust == 'stable'
|
|
run: hyperfine --prepare "cargo build -r" --runs 10 --warmup 2 -i "cargo test --all -r"
|