-
Notifications
You must be signed in to change notification settings - Fork 14
59 lines (46 loc) · 1.55 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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