Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .github/workflows/betelgeuse_dry-run.yml

This file was deleted.

70 changes: 70 additions & 0 deletions .github/workflows/betelgeuse_test_case_validation_and_upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
name: Betelgeuse Docstrings Validation and Automated Test Cases Upload
permissions:
contents: read

on:
pull_request:
paths:
- "integration-tests/**"
schedule:
# Run weekly on Mondays at 2 AM UTC
- cron: '0 2 * * 1'
workflow_dispatch: # Allow manual triggering

jobs:
betelgeuse-dry-run:
name: "betelgeuse dry-run"
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
container:
image: fedora:latest

steps:
- uses: actions/checkout@v4

- name: Base setup for Betelgeuse
run: |
dnf --setopt install_weak_deps=False install -y \
python3-pip
python3 -m pip install betelgeuse

- name: Run Betelgeuse
run: |
PYTHONPATH=integration-tests/ betelgeuse --config-module \
custom_betelgeuse_config test-case --dry-run \
integration-tests/ dryrun_project ./test_case.xml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a dry run, would it make sense to expose the generated ./test_case.xml as an artifact anyone could download and inspect?


betelgeuse-upload:
name: "betelgeuse upload to Polarion"
runs-on: ubuntu-latest
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
container:
image: fedora:latest

steps:
- uses: actions/checkout@v4

- name: Base setup for Betelgeuse
run: |
dnf --setopt install_weak_deps=False install -y \
python3-pip
python3 -m pip install betelgeuse

- name: Generate test cases XML
env:
POLARION_PROJECT: ${{ secrets.POLARION_PROJECT }}
run: |
PYTHONPATH=integration-tests/ betelgeuse --config-module \
custom_betelgeuse_config test-case --requirement-lookup-method id \
integration-tests/ ${{ secrets.POLARION_PROJECT }} ./test_case.xml

- name: Upload to Polarion
env:
POLARION_URL: ${{ secrets.POLARION_URL }}
POLARION_USERNAME: ${{ secrets.POLARION_USERNAME }}
POLARION_PASSWORD: ${{ secrets.POLARION_PASSWORD }}
run: |
curl -k -u ${{ secrets.POLARION_USERNAME }}:${{ secrets.POLARION_PASSWORD }} \
-X POST -F file=@test_case.xml \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-X POST is not necessary, it is inferred from the -F: https://daniel.haxx.se/blog/2015/09/11/unnecessary-use-of-curl-x/

${{ secrets.POLARION_URL }}/polarion/import/testcase
Loading