Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run a basic test scenario on o3 as part of CI checks #18182

Merged
merged 1 commit into from Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/openqa.yml
@@ -0,0 +1,42 @@
---
name: Run a basic openQA test
# yamllint disable-line rule:truthy
on:
pull_request_target:
# Note how this runs on:pull_request_target and not on:pull_request!
# The difference is that this runs always with the context of the master
# branch. This is necessary to allow accessing the API credential secrets.
workflow_dispatch:
env:
OPENQA_HOST: ${{ secrets.OPENQA_URL }}
OPENQA_API_KEY: ${{ secrets.OPENQA_API_KEY }}
OPENQA_API_SECRET: ${{ secrets.OPENQA_API_SECRET }}
okurz marked this conversation as resolved.
Show resolved Hide resolved
GH_REPO: ${{ github.event.pull_request.head.repo.full_name }}
GH_REF: ${{ github.event.pull_request.head.ref }}

jobs:
trigger_and_monitor_openqa:
runs-on: ubuntu-latest
container:
image: registry.opensuse.org/devel/openqa/containers/tumbleweed:client
steps:
- uses: actions/checkout@v3
- name: Determine the latest Tumbleweed build on o3
id: latest_build
run: >-
echo build=$(curl -s
${OPENQA_HOST:-https://openqa.opensuse.org}/group_overview/${OPENQA_BUILD_LOOKUP_GROUP_ID:-1}.json
| jq -r '([ .build_results[] | select(.tag.description=="published") | select(.version=="Tumbleweed") | .build ] | sort | reverse)[]'
| head -n1) >> "$GITHUB_OUTPUT"
- name: Trigger and monitor a basic openQA test on o3
kalikiana marked this conversation as resolved.
Show resolved Hide resolved
run: >-
openqa-cli schedule
--monitor
--host "${OPENQA_HOST:-https://openqa.opensuse.org}/"
--apikey "$OPENQA_API_KEY" --apisecret "$OPENQA_API_SECRET"
--param-file SCENARIO_DEFINITIONS_YAML=scenario-definitions.yaml
DISTRI=openSUSE VERSION=Tumbleweed FLAVOR=github ARCH=x86_64
HDD_1=opensuse-Tumbleweed-x86_64-${{ steps.latest_build.outputs.build }}-textmode@64bit.qcow2
UEFI_PFLASH_VARS=opensuse-Tumbleweed-x86_64-${{ steps.latest_build.outputs.build }}-textmode@64bit-uefi-vars.qcow2
BUILD="$GH_REPO.git#$GH_REF" _GROUP_ID="${OPENQA_SCHEDULE_GROUP_ID:-118}"
CASEDIR="$GITHUB_SERVER_URL/$GH_REPO.git#$GH_REF"
30 changes: 30 additions & 0 deletions scenario-definitions.yaml
@@ -0,0 +1,30 @@
---
products:
opensuse-*-github-x86_64:
distri: opensuse
flavor: github
arch: x86_64
version: Tumbleweed

machines:
64bit:
okurz marked this conversation as resolved.
Show resolved Hide resolved
backend: qemu
settings:
HDDSIZEGB: "20"
QEMUCPU: host
VIRTIO_CONSOLE: "1"
Martchus marked this conversation as resolved.
Show resolved Hide resolved
OFFLINE_SUT: "1"
WORKER_CLASS: qemu_x86_64

.common: &common
product: opensuse-*-github-x86_64
machine: 64bit

job_templates:
boot_to_snapshot:
<<: *common
settings:
BOOT_HDD_IMAGE: "1"
DESKTOP: textmode
PRODUCTDIR: products/opensuse
YAML_SCHEDULE: schedule/boot_to_snapshot.yaml
kalikiana marked this conversation as resolved.
Show resolved Hide resolved