WIP: Add TMT gating test and workflow for bootupd #7
Workflow file for this run
This file contains hidden or 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: TMT Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| inputs: | |
| plan_filter: | |
| description: | | |
| Test plan filter name, ie: tag:smoke. | |
| If provided, only tests matching this filter will be run, otherwise all tests will be run. | |
| required: false | |
| default: '' | |
| use_built_from_src: | |
| description: 'Built bootupd from source instead of install distro package' | |
| required: false | |
| default: 'true' | |
| jobs: | |
| tmt-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| set -x -e -o pipefail | |
| sudo apt-get update | |
| sudo apt-get install -y podman libblkid-dev rsync | |
| pip install --user tmt | |
| - name: Run TMT tests | |
| run: | | |
| set -x -e -o pipefail | |
| if [ "$ACT" = "true" ]; then | |
| echo "Running locally using ACT" | |
| TMT_PROVISION_OPTS="--how local --feeling-safe" | |
| else | |
| TMT_PROVISION_OPTS="--how container" | |
| fi | |
| if [ -n "${{ github.event.inputs.plan_filter }}" ]; then | |
| PLAN_FILTER_PARAM="plan --filter '${{ github.event.inputs.plan_filter }}'" | |
| fi | |
| eval "tmt run --all --debug -vvvv provision $TMT_PROVISION_OPTS $PLAN_FILTER_PARAM" |