mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 11:06:56 +08:00
Allow explicit relative path in requirements file.
This commit is contained in:
1
.github/workflows/CompletePipeline.yml
vendored
1
.github/workflows/CompletePipeline.yml
vendored
@@ -237,7 +237,6 @@ jobs:
|
||||
with:
|
||||
jobs: ${{ needs.UnitTestingParams.outputs.python_jobs }}
|
||||
# TODO: shouldn't this be configured by a parameter? Same as directories
|
||||
requirements: "-r tests/unit/requirements.txt"
|
||||
pacboy: "gcc:p"
|
||||
unittest_report_xml: ${{ needs.ConfigParams.outputs.unittest_report_xml }}
|
||||
coverage_report_xml: ${{ needs.ConfigParams.outputs.coverage_report_xml }}
|
||||
|
||||
11
.github/workflows/UnitTesting.yml
vendored
11
.github/workflows/UnitTesting.yml
vendored
@@ -47,7 +47,7 @@ on:
|
||||
requirements:
|
||||
description: 'Python dependencies to be installed through pip.'
|
||||
required: false
|
||||
default: '-r tests/requirements.txt'
|
||||
default: '-r ./requirements.txt'
|
||||
type: string
|
||||
mingw_requirements:
|
||||
description: 'Override Python dependencies to be installed through pip on MSYS2 (MINGW64) only.'
|
||||
@@ -82,7 +82,7 @@ on:
|
||||
root_directory:
|
||||
description: 'Working directory for running tests.'
|
||||
required: false
|
||||
default: ''
|
||||
default: '.'
|
||||
type: string
|
||||
tests_directory:
|
||||
description: 'Path to the directory containing tests (relative from root_directory).'
|
||||
@@ -234,7 +234,12 @@ jobs:
|
||||
|
||||
requirements = "${{ inputs.requirements }}"
|
||||
if requirements.startswith("-r"):
|
||||
requirementsFile = Path(requirements[2:].lstrip())
|
||||
requirements = requirements[2:].lstrip()
|
||||
if requirements.startswith("./"):
|
||||
requirementsFile = Path("${{ inputs.root_directory || '.' }}") / Path("${{ inputs.tests_directory || '.' }}") / Path("${{ inputs.unittest_directory || '.' }}") / Path(requirements[2:])
|
||||
else:
|
||||
requirementsFile = Path(requirements)
|
||||
|
||||
try:
|
||||
dependencies = loadRequirementsFile(requirementsFile)
|
||||
except FileNotFoundError as ex:
|
||||
|
||||
@@ -11,9 +11,9 @@ docutils_stubs ~= 0.0.22
|
||||
sphinx_rtd_theme ~= 3.0
|
||||
|
||||
# Sphinx Extenstions
|
||||
sphinxcontrib-mermaid ~= 1.0
|
||||
sphinxcontrib-mermaid ~= 1.2
|
||||
autoapi >= 2.0.1
|
||||
sphinx_design ~= 0.6
|
||||
sphinx-copybutton >= 0.5
|
||||
sphinx_autodoc_typehints ~= 3.5
|
||||
sphinx_autodoc_typehints ~= 3.6
|
||||
sphinx_reports ~= 0.9
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
-r ../requirements.txt
|
||||
|
||||
# Coverage collection
|
||||
Coverage ~= 7.11
|
||||
|
||||
# Test Runner
|
||||
pytest ~= 9.0
|
||||
pytest-cov ~= 7.0
|
||||
|
||||
# Static Type Checking
|
||||
mypy[reports] ~= 1.18
|
||||
typing_extensions ~= 4.15
|
||||
|
||||
@@ -1 +1,8 @@
|
||||
-r ../requirements.txt
|
||||
|
||||
# Coverage collection
|
||||
Coverage ~= 7.13
|
||||
|
||||
# Test Runner
|
||||
pytest ~= 9.0
|
||||
pytest-cov ~= 7.0
|
||||
|
||||
Reference in New Issue
Block a user