summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorGeorge Melikov <[email protected]>2021-01-26 15:01:44 +0300
committerBrian Behlendorf <[email protected]>2021-02-02 09:37:23 -0800
commitaa743acc79564414e8c2368e86ba5c04efb6efdd (patch)
tree5e71368ded96e28e8caf893968a3fddd3ef212f9 /.github
parent1051499aeffc35b87b5a7d37f792838d42ee5336 (diff)
CI: add ubuntu-* functional tests runner
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: George Melikov <[email protected]> Closes #11554
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/zfs-tests-functional.yml64
-rw-r--r--.github/workflows/zfs-tests-sanity.yml2
2 files changed, 66 insertions, 0 deletions
diff --git a/.github/workflows/zfs-tests-functional.yml b/.github/workflows/zfs-tests-functional.yml
new file mode 100644
index 000000000..631f174b7
--- /dev/null
+++ b/.github/workflows/zfs-tests-functional.yml
@@ -0,0 +1,64 @@
+name: zfs-tests-functional
+
+on:
+ push:
+ pull_request:
+
+jobs:
+ tests-functional-ubuntu:
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [18.04, 20.04]
+ runs-on: ubuntu-${{ matrix.os }}
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ ref: ${{ github.event.pull_request.head.sha }}
+ - name: Install dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install --yes -qq build-essential autoconf libtool gdb lcov \
+ git alien fakeroot wget curl bc fio acl \
+ sysstat mdadm lsscsi parted gdebi attr dbench watchdog ksh \
+ nfs-kernel-server samba rng-tools xz-utils \
+ zlib1g-dev uuid-dev libblkid-dev libselinux-dev \
+ xfslibs-dev libattr1-dev libacl1-dev libudev-dev libdevmapper-dev \
+ libssl-dev libffi-dev libaio-dev libelf-dev libmount-dev \
+ libpam0g-dev pamtester python-dev python-setuptools python-cffi \
+ python3 python3-dev python3-setuptools python3-cffi
+ - name: Autogen.sh
+ run: |
+ sh autogen.sh
+ - name: Configure
+ run: |
+ ./configure --enable-debug --enable-debuginfo
+ - name: Make
+ run: |
+ make --no-print-directory -s pkg-utils pkg-kmod
+ - name: Install
+ run: |
+ sudo dpkg -i *.deb
+ # Update order of directories to search for modules, otherwise
+ # Ubuntu will load kernel-shipped ones.
+ sudo sed -i.bak 's/updates/extra updates/' /etc/depmod.d/ubuntu.conf
+ sudo depmod
+ sudo modprobe zfs
+ - name: Tests
+ run: |
+ /usr/share/zfs/zfs-tests.sh -v -s 3G
+ - name: Prepare artifacts
+ if: failure()
+ run: |
+ RESULTS_PATH=$(readlink -f /var/tmp/test_results/current)
+ sudo dmesg > $RESULTS_PATH/dmesg
+ sudo cp /var/log/syslog $RESULTS_PATH/
+ sudo chmod +r $RESULTS_PATH/*
+ # Replace ':' in dir names, actions/upload-artifact doesn't support it
+ for f in $(find $RESULTS_PATH -name '*:*'); do mv "$f" "${f//:/__}"; done
+ - uses: actions/upload-artifact@v2
+ if: failure()
+ with:
+ name: Test logs Ubuntu-${{ matrix.os }}
+ path: /var/tmp/test_results/20*/
+ if-no-files-found: ignore
diff --git a/.github/workflows/zfs-tests-sanity.yml b/.github/workflows/zfs-tests-sanity.yml
index b075a78c7..e03399757 100644
--- a/.github/workflows/zfs-tests-sanity.yml
+++ b/.github/workflows/zfs-tests-sanity.yml
@@ -50,6 +50,8 @@ jobs:
sudo dmesg > $RESULTS_PATH/dmesg
sudo cp /var/log/syslog $RESULTS_PATH/
sudo chmod +r $RESULTS_PATH/*
+ # Replace ':' in dir names, actions/upload-artifact doesn't support it
+ for f in $(find $RESULTS_PATH -name '*:*'); do mv "$f" "${f//:/__}"; done
- uses: actions/upload-artifact@v2
if: failure()
with: