Skip to content

Merge pull request #103 from google/dependabot/cargo/rustix-0.38.19 #230

Merge pull request #103 from google/dependabot/cargo/rustix-0.38.19

Merge pull request #103 from google/dependabot/cargo/rustix-0.38.19 #230

Workflow file for this run

name: tests
on:
pull_request:
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
FORCE_COLOR: 3
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Test
run: cargo test
fuzz:
name: Fuzz test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install nightly Rust
run: rustup default nightly
- uses: Swatinem/rust-cache@v2
with:
# Default is "v0-rust"
# Use a separate key to prevent collision with main cache
prefix-key: "fuzz"
# Cache only on main build
save-if: ${{ github.ref == 'refs/heads/main' }}
cache-directories: |
i18n-helpers/fuzz/target
i18n-helpers/fuzz/corpus
- name: Install cargo-fuzz
run: cargo install cargo-fuzz
- name: Run group_events fuzzer and minimize corpus
run: |
cd i18n-helpers
cargo fuzz run group_events -- -only_ascii=1 -max_total_time=30
cargo fuzz cmin group_events
- name: Run normalize fuzzer and minimize corpus
run: |
cd i18n-helpers
cargo fuzz run normalize -- -only_ascii=1 -max_total_time=30
cargo fuzz cmin normalize
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Clippy
run: cargo clippy -- -D clippy::dbg_macro -D clippy::print_stdout -D clippy::print_stderr
format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
# We use an unstable rustmft feature and we thus need the
# nightly channel to enforce the formatting.
- name: Setup Rust nightly
run: rustup default nightly
- name: Install rustfmt
run: rustup component add rustfmt
- name: Check Formatting
uses: dprint/check@v2.2