]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - .github/workflows/zfs-tests-sanity.yml
zloop: Add a max iterations option, use default run/pass times
[FreeBSD/FreeBSD.git] / .github / workflows / zfs-tests-sanity.yml
1 name: zfs-tests-sanity
2
3 on:
4   push:
5   pull_request:
6
7 jobs:
8   tests:
9     runs-on: ubuntu-latest
10     steps:
11     - uses: actions/checkout@v2
12       with:
13         ref: ${{ github.event.pull_request.head.sha }}
14     - name: Install dependencies
15       run: |
16         sudo apt-get update
17         sudo apt-get install --yes -qq build-essential autoconf libtool gdb lcov \
18           git alien fakeroot wget curl bc fio acl \
19           sysstat mdadm lsscsi parted gdebi attr dbench watchdog ksh \
20           nfs-kernel-server samba rng-tools xz-utils \
21           zlib1g-dev uuid-dev libblkid-dev libselinux-dev \
22           xfslibs-dev libattr1-dev libacl1-dev libudev-dev libdevmapper-dev \
23           libssl-dev libffi-dev libaio-dev libelf-dev libmount-dev \
24           libpam0g-dev pamtester python-dev python-setuptools python-cffi \
25           python3 python3-dev python3-setuptools python3-cffi
26     - name: Autogen.sh
27       run: |
28         sh autogen.sh
29     - name: Configure
30       run: |
31         ./configure --enable-debug --enable-debuginfo
32     - name: Make
33       run: |
34         make --no-print-directory -s pkg-utils pkg-kmod
35     - name: Install
36       run: |
37         sudo dpkg -i *.deb
38         # Update order of directories to search for modules, otherwise
39         #   Ubuntu will load kernel-shipped ones.
40         sudo sed -i.bak 's/updates/extra updates/' /etc/depmod.d/ubuntu.conf
41         sudo depmod
42         sudo modprobe zfs
43         # Workaround to provide additional free space for testing.
44         #   https://github.com/actions/virtual-environments/issues/2840
45         sudo rm -rf /usr/share/dotnet
46         sudo rm -rf /opt/ghc
47         sudo rm -rf "/usr/local/share/boost"
48         sudo rm -rf "$AGENT_TOOLSDIRECTORY"
49     - name: Tests
50       run: |
51         /usr/share/zfs/zfs-tests.sh -v -s 3G -r sanity
52     - name: Prepare artifacts
53       if: failure()
54       run: |
55         RESULTS_PATH=$(readlink -f /var/tmp/test_results/current)
56         sudo dmesg > $RESULTS_PATH/dmesg
57         sudo cp /var/log/syslog $RESULTS_PATH/
58         sudo chmod +r $RESULTS_PATH/*
59         # Replace ':' in dir names, actions/upload-artifact doesn't support it
60         for f in $(find $RESULTS_PATH -name '*:*'); do mv "$f" "${f//:/__}"; done
61     - uses: actions/upload-artifact@v2
62       if: failure()
63       with:
64         name: Test logs
65         path: /var/tmp/test_results/20*/
66         if-no-files-found: ignore