2023-03-15 20:41:05 +03:00
|
|
|
name: zfs-linux-tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
os:
|
|
|
|
description: 'The ubuntu version: 20.02 or 22.04'
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
zloop:
|
|
|
|
runs-on: ubuntu-${{ inputs.os }}
|
|
|
|
steps:
|
2024-01-27 01:22:26 +03:00
|
|
|
- uses: actions/checkout@v4
|
2023-03-16 01:37:56 +03:00
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
2024-01-27 01:22:26 +03:00
|
|
|
- uses: actions/download-artifact@v4
|
2023-03-15 20:41:05 +03:00
|
|
|
with:
|
|
|
|
name: modules-${{ inputs.os }}
|
|
|
|
- name: Install modules
|
|
|
|
run: |
|
|
|
|
tar xzf modules-${{ inputs.os }}.tgz
|
|
|
|
.github/workflows/scripts/setup-dependencies.sh tests
|
|
|
|
- name: Tests
|
|
|
|
timeout-minutes: 30
|
|
|
|
run: |
|
|
|
|
sudo mkdir -p /var/tmp/zloop
|
|
|
|
# run for 10 minutes or at most 2 iterations for a maximum runner
|
|
|
|
# time of 20 minutes.
|
|
|
|
sudo /usr/share/zfs/zloop.sh -t 600 -I 2 -l -m1 -- -T 120 -P 60
|
|
|
|
- name: Prepare artifacts
|
|
|
|
if: failure()
|
|
|
|
run: |
|
|
|
|
sudo chmod +r -R /var/tmp/zloop/
|
2024-01-27 01:22:26 +03:00
|
|
|
- uses: actions/upload-artifact@v4
|
2023-03-15 20:41:05 +03:00
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: Zpool-logs-${{ inputs.os }}
|
|
|
|
path: |
|
|
|
|
/var/tmp/zloop/*/
|
|
|
|
!/var/tmp/zloop/*/vdev/
|
2023-03-16 20:00:14 +03:00
|
|
|
retention-days: 14
|
2023-03-15 20:41:05 +03:00
|
|
|
if-no-files-found: ignore
|
2024-01-27 01:22:26 +03:00
|
|
|
- uses: actions/upload-artifact@v4
|
2023-03-15 20:41:05 +03:00
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: Zpool-files-${{ inputs.os }}
|
|
|
|
path: |
|
|
|
|
/var/tmp/zloop/*/vdev/
|
2023-03-16 20:00:14 +03:00
|
|
|
retention-days: 14
|
2023-03-15 20:41:05 +03:00
|
|
|
if-no-files-found: ignore
|
|
|
|
|
|
|
|
sanity:
|
|
|
|
runs-on: ubuntu-${{ inputs.os }}
|
|
|
|
steps:
|
2024-01-27 01:22:26 +03:00
|
|
|
- uses: actions/checkout@v4
|
2023-03-16 01:37:56 +03:00
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
2024-01-27 01:22:26 +03:00
|
|
|
- uses: actions/download-artifact@v4
|
2023-03-15 20:41:05 +03:00
|
|
|
with:
|
|
|
|
name: modules-${{ inputs.os }}
|
|
|
|
- name: Install modules
|
|
|
|
run: |
|
|
|
|
tar xzf modules-${{ inputs.os }}.tgz
|
|
|
|
.github/workflows/scripts/setup-dependencies.sh tests
|
|
|
|
- name: Tests
|
|
|
|
timeout-minutes: 60
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
set -o pipefail
|
|
|
|
/usr/share/zfs/zfs-tests.sh -vKR -s 3G -r sanity | scripts/zfs-tests-color.sh
|
|
|
|
- name: Prepare artifacts
|
|
|
|
if: success() || failure()
|
|
|
|
run: |
|
|
|
|
RESPATH="/var/tmp/test_results"
|
|
|
|
mv -f $RESPATH/current $RESPATH/testfiles
|
|
|
|
tar cf $RESPATH/sanity.tar -h -C $RESPATH testfiles
|
2024-01-27 01:22:26 +03:00
|
|
|
- uses: actions/upload-artifact@v4
|
2023-03-15 20:41:05 +03:00
|
|
|
if: success() || failure()
|
|
|
|
with:
|
|
|
|
name: Logs-${{ inputs.os }}-sanity
|
|
|
|
path: /var/tmp/test_results/sanity.tar
|
|
|
|
if-no-files-found: ignore
|
|
|
|
|
|
|
|
functional:
|
|
|
|
runs-on: ubuntu-${{ inputs.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
tests: [ part1, part2, part3, part4 ]
|
|
|
|
steps:
|
2024-01-27 01:22:26 +03:00
|
|
|
- uses: actions/checkout@v4
|
2023-03-16 01:37:56 +03:00
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
2024-01-27 01:22:26 +03:00
|
|
|
- uses: actions/download-artifact@v4
|
2023-03-15 20:41:05 +03:00
|
|
|
with:
|
|
|
|
name: modules-${{ inputs.os }}
|
|
|
|
- name: Install modules
|
|
|
|
run: |
|
|
|
|
tar xzf modules-${{ inputs.os }}.tgz
|
|
|
|
.github/workflows/scripts/setup-dependencies.sh tests
|
|
|
|
- name: Setup tests
|
|
|
|
run: |
|
|
|
|
.github/workflows/scripts/setup-functional.sh ${{ matrix.tests }} >> $GITHUB_ENV
|
|
|
|
- name: Tests
|
|
|
|
timeout-minutes: 120
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
set -o pipefail
|
|
|
|
/usr/share/zfs/zfs-tests.sh -vKR -s 3G -T ${{ env.TODO }} | scripts/zfs-tests-color.sh
|
|
|
|
- name: Prepare artifacts
|
|
|
|
if: success() || failure()
|
|
|
|
run: |
|
|
|
|
RESPATH="/var/tmp/test_results"
|
|
|
|
mv -f $RESPATH/current $RESPATH/testfiles
|
|
|
|
tar cf $RESPATH/${{ matrix.tests }}.tar -h -C $RESPATH testfiles
|
2024-01-27 01:22:26 +03:00
|
|
|
- uses: actions/upload-artifact@v4
|
2023-03-15 20:41:05 +03:00
|
|
|
if: success() || failure()
|
|
|
|
with:
|
2024-01-27 01:22:26 +03:00
|
|
|
name: Logs-${{ inputs.os }}-functional-${{ matrix.tests }}
|
2023-03-15 20:41:05 +03:00
|
|
|
path: /var/tmp/test_results/${{ matrix.tests }}.tar
|
|
|
|
if-no-files-found: ignore
|