Actually run tests and not just build #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- uses: giraffate/clippy-action@v1 | |
with: | |
reporter: 'github-pr-review' | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
build_and_test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Build | |
run: cargo build --features bundled --verbose | |
- name: Run tests | |
run: cargo test --features bundled --verbose | |
sanitizer: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Rust source code | |
run: rustup component add rust-src --toolchain stable-x86_64-unknown-linux-gnu | |
- name: Run tests with address sanitizer | |
run: cargo test --features bundled -Zbuild-std --target x86_64-unknown-linux-gnu --verbose | |
env: | |
RUSTC_BOOTSTRAP: 1 | |
CXXFLAGS: "-fsanitize=address -g" | |
RUSTFLAGS: "-Zsanitizer=address" | |
RUSTDOCFLAGS: "-Zsanitizer=address" | |