summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreduardormorais <eduardoromorais@gmail.com>2025-09-16 13:35:47 -0300
committereduardormorais <eduardoromorais@gmail.com>2025-09-16 13:35:47 -0300
commitb7b4de7478b90574cd27a567130cced01650fbc8 (patch)
tree184c4fef2058fabc3afeb1f33f10b7fc0c078f81
parent8b22a629816885313e929346f0c7a382b6ba6823 (diff)
downloadpyvyos-b7b4de7478b90574cd27a567130cced01650fbc8.tar.gz
pyvyos-b7b4de7478b90574cd27a567130cced01650fbc8.zip
Feature/9792011653 - Inclusion of workflow for executing unit tests in pull requests
-rw-r--r--.github/workflows/python-pr-validation.yml31
1 files changed, 31 insertions, 0 deletions
diff --git a/.github/workflows/python-pr-validation.yml b/.github/workflows/python-pr-validation.yml
new file mode 100644
index 0000000..51a73c6
--- /dev/null
+++ b/.github/workflows/python-pr-validation.yml
@@ -0,0 +1,31 @@
+name: Python Pull Request Validation Workflow
+
+on:
+ pull_request:
+ branches: [ "main", "master" ]
+
+jobs:
+ Validation:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v2
+ with:
+ python-version: "3.12"
+ architecture: "x64"
+
+ - name: Install dependencies
+ run: |
+ python3 -m pip install --upgrade pip
+ pip install poetry
+ pip install pytest
+ poetry config virtualenvs.create false
+ poetry install --no-interaction --no-ansi
+
+ - name: Python Run Tests
+ run: |
+ pytest -v -o junit_family=xunit1 --cov=. --cov-report xml:tests/coverage.xml --junitxml=tests/nosetests.xml
+