fix(_Test-OCI-Factory.yaml): allow cancellation of final pytest steps #168
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: _Test OCI Factory | mock-rock | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- ".github/workflows/*" | |
- "!.github/workflows/CLA-Check.yaml" | |
- "!.github/workflows/PR-Validator.yaml" | |
- "!.github/workflows/_Auto-updates.yaml" | |
- "!.github/workflows/Continuous-Testing.yaml" | |
- "!.github/workflows/CLI-Client.yaml" | |
- "examples/**" | |
- "oci/mock*" | |
- "src/**" | |
- "!src/workflow-engine/**" | |
- "!src/cli-client/**" | |
env: | |
# local path to clone the oci-factory to | |
# path of pytest junit output | |
PYTEST_RESULT_PATH: pytest_results.xml | |
jobs: | |
pytest: | |
# Trigger python unit tests across the repository | |
name: pytest | |
runs-on: ubuntu-22.04 | |
steps: | |
# Job Setup | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
# Note: Add additional dependency installation lines as required below | |
# test-oci-factory/pytest requirements | |
- run: pip install -r src/test-oci-factory/pytest/requirements.txt | |
- name: Run pytest | |
continue-on-error: true | |
run: | | |
python3 -m pytest --junit-xml "${{ env.PYTEST_RESULT_PATH }}" | |
- name: Generate Summary | |
if: ${{ !cancelled() }} | |
run: | | |
python3 src/test-oci-factory/pytest/format_markdown_report.py --input-junit "${{ env.PYTEST_RESULT_PATH }}" >> $GITHUB_STEP_SUMMARY | |
- name: Upload pytest Result | |
if: ${{ !cancelled() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.PYTEST_RESULT_PATH }} | |
path: ${{ env.PYTEST_RESULT_PATH }} | |
if-no-files-found: error | |
test-workflows: | |
name: Trigger internal tests for mock-rock | |
uses: ./.github/workflows/Image.yaml | |
with: | |
oci-image-name: "mock-rock" | |
upload: true | |
secrets: inherit |