tests: simplify detection of Catch v3 for tests #439
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: hex2sv | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y cargo rustc | |
- name: Build application | |
run: | | |
cd "$GITHUB_WORKSPACE/dev/hex2sv" | |
cargo build | |
- name: Run tests | |
run: | | |
cd "$GITHUB_WORKSPACE/dev/hex2sv" | |
cargo test | |
clippy: | |
runs-on: ubuntu-22.04 | |
name: Clippy lints | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install packages | |
run: sudo apt-get install -y wget | |
- name: Rustup | |
run: | | |
wget -O /tmp/ru.sh https://sh.rustup.rs | |
chmod u+x /tmp/ru.sh | |
/tmp/ru.sh -y --profile minimal --component clippy | |
source $HOME/.cargo/env | |
export PATH="$HOME/.cargo/bin:$PATH" | |
- name: List installed Rust and Cargo version | |
run: | | |
rustc --version | |
cargo --version | |
- name: Lint with clippy | |
run: | | |
cd "$GITHUB_WORKSPACE/dev/hex2sv" | |
cargo clippy -- -D warnings |