]> git.proxmox.com Git - mirror_zfs.git/blame - .github/workflows/zfs-linux-tests.yml
ZTS: Apply small changes for speeding up the tests
[mirror_zfs.git] / .github / workflows / zfs-linux-tests.yml
CommitLineData
b7bc334d
TR
1name: zfs-linux-tests
2
3on:
4 workflow_call:
5 inputs:
6 os:
7 description: 'The ubuntu version: 20.02 or 22.04'
8 required: true
9 type: string
10
11jobs:
12
13 zloop:
14 runs-on: ubuntu-${{ inputs.os }}
15 steps:
c9c463a5
TR
16 - uses: actions/checkout@v3
17 with:
18 ref: ${{ github.event.pull_request.head.sha }}
b7bc334d
TR
19 - uses: actions/download-artifact@v3
20 with:
21 name: modules-${{ inputs.os }}
22 - name: Install modules
23 run: |
24 tar xzf modules-${{ inputs.os }}.tgz
25 .github/workflows/scripts/setup-dependencies.sh tests
26 - name: Tests
27 timeout-minutes: 30
28 run: |
29 sudo mkdir -p /var/tmp/zloop
30 # run for 10 minutes or at most 2 iterations for a maximum runner
31 # time of 20 minutes.
32 sudo /usr/share/zfs/zloop.sh -t 600 -I 2 -l -m1 -- -T 120 -P 60
33 - name: Prepare artifacts
34 if: failure()
35 run: |
36 sudo chmod +r -R /var/tmp/zloop/
37 - uses: actions/upload-artifact@v3
38 if: failure()
39 with:
40 name: Zpool-logs-${{ inputs.os }}
41 path: |
42 /var/tmp/zloop/*/
43 !/var/tmp/zloop/*/vdev/
480d8097 44 retention-days: 14
b7bc334d
TR
45 if-no-files-found: ignore
46 - uses: actions/upload-artifact@v3
47 if: failure()
48 with:
49 name: Zpool-files-${{ inputs.os }}
50 path: |
51 /var/tmp/zloop/*/vdev/
480d8097 52 retention-days: 14
b7bc334d
TR
53 if-no-files-found: ignore
54
55 sanity:
56 runs-on: ubuntu-${{ inputs.os }}
57 steps:
c9c463a5
TR
58 - uses: actions/checkout@v3
59 with:
60 ref: ${{ github.event.pull_request.head.sha }}
b7bc334d
TR
61 - uses: actions/download-artifact@v3
62 with:
63 name: modules-${{ inputs.os }}
64 - name: Install modules
65 run: |
66 tar xzf modules-${{ inputs.os }}.tgz
67 .github/workflows/scripts/setup-dependencies.sh tests
68 - name: Tests
69 timeout-minutes: 60
70 shell: bash
71 run: |
72 set -o pipefail
73 /usr/share/zfs/zfs-tests.sh -vKR -s 3G -r sanity | scripts/zfs-tests-color.sh
74 - name: Prepare artifacts
75 if: success() || failure()
76 run: |
77 RESPATH="/var/tmp/test_results"
78 mv -f $RESPATH/current $RESPATH/testfiles
79 tar cf $RESPATH/sanity.tar -h -C $RESPATH testfiles
80 - uses: actions/upload-artifact@v3
81 if: success() || failure()
82 with:
83 name: Logs-${{ inputs.os }}-sanity
84 path: /var/tmp/test_results/sanity.tar
85 if-no-files-found: ignore
86
87 functional:
88 runs-on: ubuntu-${{ inputs.os }}
89 strategy:
90 fail-fast: false
91 matrix:
92 tests: [ part1, part2, part3, part4 ]
93 steps:
c9c463a5
TR
94 - uses: actions/checkout@v3
95 with:
96 ref: ${{ github.event.pull_request.head.sha }}
b7bc334d
TR
97 - uses: actions/download-artifact@v3
98 with:
99 name: modules-${{ inputs.os }}
100 - name: Install modules
101 run: |
102 tar xzf modules-${{ inputs.os }}.tgz
103 .github/workflows/scripts/setup-dependencies.sh tests
104 - name: Setup tests
105 run: |
106 .github/workflows/scripts/setup-functional.sh ${{ matrix.tests }} >> $GITHUB_ENV
107 - name: Tests
108 timeout-minutes: 120
109 shell: bash
110 run: |
111 set -o pipefail
112 /usr/share/zfs/zfs-tests.sh -vKR -s 3G -T ${{ env.TODO }} | scripts/zfs-tests-color.sh
113 - name: Prepare artifacts
114 if: success() || failure()
115 run: |
116 RESPATH="/var/tmp/test_results"
117 mv -f $RESPATH/current $RESPATH/testfiles
118 tar cf $RESPATH/${{ matrix.tests }}.tar -h -C $RESPATH testfiles
119 - uses: actions/upload-artifact@v3
120 if: success() || failure()
121 with:
122 name: Logs-${{ inputs.os }}-functional
123 path: /var/tmp/test_results/${{ matrix.tests }}.tar
124 if-no-files-found: ignore