]> git.proxmox.com Git - mirror_zfs.git/commitdiff
CI: add new zfs-tests-sanity workflow
authorGeorge Melikov <mail@gmelikov.ru>
Tue, 8 Dec 2020 17:53:45 +0000 (20:53 +0300)
committerGitHub <noreply@github.com>
Tue, 8 Dec 2020 17:53:45 +0000 (09:53 -0800)
Run zfs-tests with sanity.run for brief results.  Timeouts
are rare, so minimize false positives by increasing the
default from 60 to 180 seconds.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes #11304

.github/workflows/zfs-tests.yml [new file with mode: 0644]
tests/runfiles/sanity.run

diff --git a/.github/workflows/zfs-tests.yml b/.github/workflows/zfs-tests.yml
new file mode 100644 (file)
index 0000000..b075a78
--- /dev/null
@@ -0,0 +1,58 @@
+name: zfs-tests-sanity
+
+on:
+  push:
+  pull_request:
+
+jobs:
+  tests:
+    runs-on: ubuntu-latest
+    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 -r sanity
+    - 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/*
+    - uses: actions/upload-artifact@v2
+      if: failure()
+      with:
+        name: Test logs
+        path: /var/tmp/test_results/20*/
+        if-no-files-found: ignore
index cd63fa8b0edebb03eaf97f4edef85c0da26b1c21..3200261d81de8bb4b70f179c2a101480f17034eb 100644 (file)
@@ -22,7 +22,7 @@ pre = setup
 quiet = False
 pre_user = root
 user = root
-timeout = 60
+timeout = 180
 post_user = root
 post = cleanup
 failsafe_user = root