Fixing C-API calls to resolve some failures with local/offline databases #112
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: Compile and run tests | |
on: [push, pull_request] | |
jobs: | |
lint-and-build: | |
runs-on: ubuntu-latest | |
container: "quay.io/centos/centos:stream9" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install librpm dependencies | |
run: | | |
dnf install -y rpm-devel gcc clang-devel | |
dnf -y clean all | |
- name: ⚙️ Install Rust | |
run: | | |
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y | |
echo $PATH:"$HOME/.cargo/bin" >> $GITHUB_PATH | |
- name: 📎 Run Linters | |
run: | | |
cargo clippy --release -- -D warnings | |
cargo fmt --all -- --check | |
cargo doc --no-deps | |
- name: 🔨 Build (Debug) | |
run: cargo build --verbose | |
- name: 🔨 Build (Release) | |
run: cargo build --release --verbose | |
- name: 🧪 Run Unit Tests | |
run: cargo test --release --bins --lib | |
integration-tests: | |
strategy: | |
matrix: | |
container: ["fedora:38", "quay.io/centos/centos:stream9"] | |
container: ${{ matrix.container }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install librpm dependencies | |
run: | | |
dnf install -y rpm-devel gcc clang-devel | |
dnf -y clean all | |
- name: ⚙️ Install Rust | |
run: | | |
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y | |
echo $PATH:"$HOME/.cargo/bin" >> $GITHUB_PATH | |
- name: 🧪 Run Integration Tests | |
run: | | |
cargo test --test '*' --release --all-features |