Skip to content

Commit

Permalink
feat(workflow): Adding a GitHub workflow for test docstrings validation
Browse files Browse the repository at this point in the history
  • Loading branch information
zpetrace committed Aug 28, 2024
1 parent 3f635b1 commit eb76be9
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/docstring_validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Test Docstrings Validation

on:
pull_request:
paths:
- "integration-tests/**"

jobs:
betelgeuse:
name: "betelgeuse dry-run"
runs-on: ubuntu-latest
container:
image: fedora:latest

steps:
- name: Base setup for Betelgeuse
run: |
dnf --setopt install_weak_deps=False install -y \
python3-pip
python3 -m pip install betelgeuse
- uses: actions/checkout@v4

- name: Run Betelgeuse
run: |
betelgeuse --config-module \
custom_betelgeuse_config test-case --dry-run \
integration-tests/ dryrun_project ./test_case
testimony:
name: testimony validate
runs-on: ubuntu-latest
container:
image: fedora:latest

steps:
- name: Setup for Testimony
run: |
dnf --setopt install_weak_deps=False install -y \
python3-pip \
python3 -m pip install testimony
- uses: actions/checkout@v4

- name: Run Testimony
run: |
testimony validate --config \
integration-tests/testimony.yaml integration-tests/
13 changes: 13 additions & 0 deletions integration-tests/custom_betelgeuse_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from betelgeuse import default_config

TESTCASE_CUSTOM_FIELDS = default_config.TESTCASE_CUSTOM_FIELDS + (
"casecomponent",
"requirement",
"subsystemteam",
"tier",
)

DEFAULT_CASECOMPONENT_VALUE = ""
DEFAULT_REQUIREMENT_VALUE = ""
DEFAULT_SUBSYSTEMTEAM_VALUE = ""
DEFAULT_TIER_VALUE = ""
32 changes: 32 additions & 0 deletions integration-tests/testimony.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
CaseComponent:
casesensitive: false
required: true
type: string
Requirement:
casesensitive: false
required: true
type: string
SubSystemTeam:
casesensitive: false
required: true
type: string
CaseAutomation:
casesensitive: false
required: true
type: string
Upstream:
casesensitive: false
type: string
Title:
casesensitive: false
type: string
Description:
casesensitive: false
required: true
type: string
Tier:
casesensitive: false
required: true
type: string
Steps: {}
ExpectedResults: {}

0 comments on commit eb76be9

Please sign in to comment.