rh_kselftests_vm: kernel selftests execution in guest #6833
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GH Actions | |
on: | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
python-style-check: | |
name: Python ${{ matrix.python-version }} | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python-version: [3.6, 3.9] | |
fail-fast: false | |
steps: | |
- run: echo "Job triggered by a ${{ github.event_name }} event on branch is ${{ github.ref }} in repository is ${{ github.repository }}" | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install sphinx | |
pip install -r requirements-ci.txt | |
- name: Run inspekt | |
if: ${{ matrix.python-version > 3.6 }} | |
run: inspekt checkall --disable-style E501,E265,W601,E402,E722,E741 --disable-lint=W,R,C,E0601,E1002,E1101,E1103,E1120,F0401,I0011,I1101 --enable-lint W0611,W1201 --no-license-check | |
- name: Run inspekt (py36) | |
if: ${{ matrix.python-version == 3.6 }} | |
run: inspekt checkall --disable-style E501,E265,W601,E402,E722,E741 --disable-lint=W,R,C,E0012,E0601,E1002,E1101,E1103,E1120,F0401,I0011,I1101 --enable-lint W0611,W1201 --no-license-check | |
- run: echo "This job's status is ${{ job.status }}." | |
commitlint: | |
name: Commit lint | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Lint commit messages | |
uses: wagoid/commitlint-github-action@v5 | |
with: | |
configFile: ./.ci/commitlint.config.ts | |
helpURL: https://avocado-framework.readthedocs.io/en/latest/guides/contributor/chapters/styleguides.html#commit-style-guide | |
pr-check: | |
name: PR title | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check title length of pull request(${{github.event.pull_request.number}}) | |
run: | | |
if [ $(echo "${{ github.event.pull_request.title }}" | wc -L) -gt 72 ]; then | |
echo "Title of pull request(${{github.event.pull_request.number}}) is longer than 72 characters" | |
exit 1 | |
fi | |
cfg-lint-check: | |
name: Cfg lint | |
runs-on: ubuntu-20.04 | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Get changed files | |
id: cfg-files | |
uses: tj-actions/changed-files@v35 | |
with: | |
files: | | |
*/tests/cfg/*.cfg | |
- name: Set matrix | |
id: set-matrix | |
run: echo matrix=$(python3 -c 'print("${{ steps.cfg-files.outputs.all_changed_files }}".split())') >> $GITHUB_OUTPUT | |
- name: Check cfg files lint | |
if: steps.cfg-files.outputs.any_changed == 'true' | |
run: | | |
./.ci/cfg-lint-check.py ${{ steps.cfg-files.outputs.all_changed_files }} | |
cartesian-syntax-check: | |
name: Cartesian syntax | |
runs-on: ubuntu-20.04 | |
needs: cfg-lint-check | |
if: ${{ needs.cfg-lint-check.outputs.matrix != '[]' }} | |
strategy: | |
matrix: | |
file: ${{ fromJson(needs.cfg-lint-check.outputs.matrix) }} | |
fail-fast: false | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Parse ${{ matrix.file }} into Cartesian configuration | |
env: | |
CFG_FILE: ${{ matrix.file }} | |
run: | | |
echo "Parse ${CFG_FILE} into Cartesian configuration" | |
sed -i '1s/^/variants:\n/' ${CFG_FILE} | |
curl -fsSL https://raw.githubusercontent.com/avocado-framework/avocado-vt/master/virttest/cartesian_config.py | python3 - -f ${CFG_FILE} |