refactor: separate actions in substructure, run as bash script
This commit is contained in:
16
run_pytest_for_plugin/action.yml
Normal file
16
run_pytest_for_plugin/action.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
name: Run Pytest for Plugin
|
||||
description: "Run pytest for the specified BEC plugin repository"
|
||||
inputs:
|
||||
PLUGIN_REPO_NAME:
|
||||
description: "Name of the plugin repository to run tests for"
|
||||
required: true
|
||||
default: ""
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Run Pytest for Plugin
|
||||
shell: bash
|
||||
run: |
|
||||
chmod +x run_ci.sh
|
||||
./run_ci.sh "${{ inputs.PLUGIN_REPO_NAME }}"
|
||||
13
run_pytest_for_plugin/run_ci.sh
Normal file
13
run_pytest_for_plugin/run_ci.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
PLUGIN_REPO_NAME="$1"
|
||||
|
||||
echo "--- Running Pytest for Plugin: $PLUGIN_REPO_NAME ---"
|
||||
|
||||
cd ./_plugin_checkout_/"$PLUGIN_REPO_NAME"
|
||||
|
||||
# --- Step 1: Run Pytest ---
|
||||
pytest --random-order --cov=. --cov-config=./pyproject.toml --cov-branch --cov-report=xml --no-cov-on-fail ./tests/ || test $? -eq 5
|
||||
|
||||
echo "=== Completed Pytest for Plugin: $PLUGIN_REPO_NAME ==="
|
||||
Reference in New Issue
Block a user