Skip to content

Commit a60f54c

Browse files
committed
ci: add job to test programs separately
1 parent cb2c9d3 commit a60f54c

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,29 @@ jobs:
3636
sudo apt-get -yq --no-install-suggests --no-install-recommends install libsystemd-dev
3737
- run: cargo test --all
3838

39+
test_separately:
40+
name: Test each util separately
41+
runs-on: ${{ matrix.os }}
42+
strategy:
43+
matrix:
44+
os: [ubuntu-latest, macOS-latest, windows-latest]
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: dtolnay/rust-toolchain@stable
48+
- if: ${{ contains(matrix.os, 'ubuntu') }}
49+
run: |
50+
sudo apt-get update -y
51+
sudo apt-get -yq --no-install-suggests --no-install-recommends install libsystemd-dev
52+
- name: build and test all programs separately
53+
shell: bash
54+
run: |
55+
## TODO: add hugetop and skill
56+
programs = "free pgrep pidof pidwait pkill pmap ps pwdx slabtop snice sysctl tload top vmstat w watch"
57+
for program in $programs; do
58+
echo "Building and testing $program"
59+
cargo test -p "uu_$program" || exit 1
60+
done
61+
3962
coverage:
4063
name: Code Coverage
4164
runs-on: ${{ matrix.job.os }}

0 commit comments

Comments
 (0)