Skip to content

Commit

Permalink
CI: use self-hosted runner to run tests
Browse files Browse the repository at this point in the history
Use prepared VM machine in GitHub actions to run mdadm tests on it.

Signed-off-by: Kinga Stefaniuk <[email protected]>
  • Loading branch information
ktanska committed Sep 20, 2024
1 parent 9b8933b commit 4bac5d0
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/tools/run_basic_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/bash

sudo make -j$(nproc) && sudo make install
sudo ./test cleanup
sudo ./test setup
sudo ./test 00 --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test 01 --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test 02 --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test 03 --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test 04 --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test 05 --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test 06 --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test 07 --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test 08 --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test 09 --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test --raidtype=ddf --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test --raidtype=imsm --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test --raidtype=raid0 --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test --raidtype=raid1 --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test --raidtype=raid456 --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test --raidtype=raid10 --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test cleanup
11 changes: 11 additions & 0 deletions .github/tools/run_raid_type_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/bash

sudo ./test cleanup
sudo ./test setup
sudo ./test --raidtype=ddf --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test --raidtype=imsm --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test --raidtype=raid0 --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test --raidtype=raid1 --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test --raidtype=raid456 --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test --raidtype=raid10 --skip-broken --skip-always-broken --no-error --disable-integrity --disable-multipath --disable-linear --keep-going --dev=loop
sudo ./test cleanup
19 changes: 19 additions & 0 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,22 @@ jobs:
run: mv .github/tools/.checkpatch.conf .
- name: Run checkpatch review
uses: webispy/checkpatch-action@v9
upstream_tests:
runs-on: self-hosted
#timeout-minutes: 120
name: upstream tests
steps:
- uses: actions/checkout@v4
- name: 'Run on VM'
run: |
vagrant snapshot restore clean_vm_v1
echo "FYI vagrant restore command finished with exit code: $?"
sleep 2
vagrant status
vagrant up
sleep 2
vagrant ssh -c "ls && cd host/mdadm && .github/tools/run_basic_tests.sh"
vagrant ssh -c "ls && cd host/mdadm && .github/tools/run_raid_type_tests.sh"
# - uses: actions/download-artifact@v4
# with:
# name: /var/tmp/*.log

0 comments on commit 4bac5d0

Please sign in to comment.