Skip to content

ci: add fio-tests workflow integration #3

ci: add fio-tests workflow integration

ci: add fio-tests workflow integration #3

Workflow file for this run

name: Run fio-tests on self-hosted runner
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
workflow_dispatch: # Add this for manual triggering of the workflow
jobs:
run-fio-tests:
name: Run fio-tests CI
runs-on: [self-hosted, Linux, X64]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set CI metadata for kdevops-results-archive
run: |
echo "$(basename ${{ github.repository }})" > ci.trigger
git log -1 --pretty=format:"%s" > ci.subject
# Start out pessimistic
echo "not ok" > ci.result
echo "Nothing to write home about." > ci.commit_extra
- name: Set kdevops path
run: echo "KDEVOPS_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- name: Configure git
run: |
git config --global --add safe.directory '*'
git config --global user.name "kdevops"
git config --global user.email "[email protected]"
- name: Run kdevops make defconfig for quick fio-tests
run: |
KDEVOPS_TREE_REF="${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}"
SHORT_PREFIX="$(echo ${KDEVOPS_TREE_REF:0:12})"
FIO_TESTS_QUICK_TEST=y make KDEVOPS_HOSTS_PREFIX="$SHORT_PREFIX" \
ANSIBLE_CFG_CALLBACK_PLUGIN="debug" \
defconfig-fio-tests-quick
- name: Run kdevops make
run: |
make -j$(nproc)
- name: Run kdevops make bringup
run: |
make bringup
- name: Run quick fio-tests to verify functionality
run: |
make fio-tests
echo "ok" > ci.result
# Collect basic test completion info
find workflows/fio-tests/results -name "*.json" -type f | head -5 > ci.commit_extra || echo "No JSON results found" > ci.commit_extra
if find workflows/fio-tests/results -name "*.json" -type f | grep -q .; then
echo "ok" > ci.result
else
echo "No fio-tests results found" > ci.commit_extra
fi
- name: Generate fio-tests graphs if results exist
run: |
if [ -d workflows/fio-tests/results ] && find workflows/fio-tests/results -name "*.json" -type f | grep -q .; then
make fio-tests-graph || echo "Graph generation failed" >> ci.commit_extra
fi
- name: Get systemd journal files
if: always() # This ensures the step runs even if previous steps failed
run: |
make journal-dump
- name: Start SSH Agent
if: always() # Ensure this step runs even if previous steps failed
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Build our kdevops archive results
if: always() # This ensures the step runs even if previous steps failed
run: |
make ci-archive
- name: Upload our kdevops results archive
if: always() # This ensures the step runs even if previous steps failed
uses: actions/upload-artifact@v4
with:
name: kdevops-fio-tests-results
path: ${{ env.KDEVOPS_PATH }}/archive/*.zip
# Ensure make destroy always runs, even on failure
- name: Run kdevops make destroy
if: always() # This ensures the step runs even if previous steps failed
run: |
make destroy