Skip to content

Commit

Permalink
Ability to skip tests when doing workflow dispatch (#706)
Browse files Browse the repository at this point in the history
  • Loading branch information
wdbasson authored Mar 26, 2024
1 parent 20d5b25 commit 0d5ebc2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/continuous-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
run-tests:
description: "Run tests step"
required: false
default: false
default: true
type: boolean

push:
Expand Down Expand Up @@ -527,7 +527,7 @@ jobs:
IMAGE_TAG: ${{ needs.build.outputs.image_version }}

- name: Helmfile apply pytest
# if: github.event.review.state == 'approved' || github.event_name == 'push' || ( github.event.inputs.run-reset-deployments == 'true' && github.event.inputs.run-tests == 'true' ) || github.event.inputs.run-tests == 'true'
if: ${{ github.event_name != 'workflow_dispatch' || (github.event_name == 'workflow_dispatch' && github.event.inputs.run-tests != 'false') }}
id: pytest
uses: helmfile/[email protected]
with:
Expand All @@ -547,7 +547,7 @@ jobs:
IMAGE_TAG: ${{ needs.build.outputs.image_version }}

- name: Wait for pytest and print logs
# if: github.event.review.state == 'approved' || github.event_name == 'push' || ( github.event.inputs.run-reset-deployments == 'true' && github.event.inputs.run-tests == 'true' ) || github.event.inputs.run-tests == 'true'
if: ${{ github.event_name != 'workflow_dispatch' || (github.event_name == 'workflow_dispatch' && github.event.inputs.run-tests != 'false') }}
run: |
while true; do
# Check if the job is complete or failed
Expand Down Expand Up @@ -578,7 +578,7 @@ jobs:
NAMESPACE: dev-cloudapi

- name: Copy k8s pytest results
# if: github.event.review.state == 'approved' || github.event_name == 'push' || ( github.event.inputs.run-reset-deployments == 'true' && github.event.inputs.run-tests == 'true' ) || github.event.inputs.run-tests == 'true'
if: ${{ github.event_name != 'workflow_dispatch' || (github.event_name == 'workflow_dispatch' && github.event.inputs.run-tests != 'false') }}
run: |
echo "apiVersion: v1
kind: Pod
Expand Down Expand Up @@ -625,15 +625,15 @@ jobs:

- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: always()
if: ${{ github.event_name != 'workflow_dispatch' || (github.event_name == 'workflow_dispatch' && github.event.inputs.run-tests != 'false') }}
with:
report_paths: "./test_output.xml"
fail_on_failure: true
detailed_summary: true
require_passed_tests: true

- name: Pytest coverage comment
if: github.event_name == 'pull_request'
if: ${{ github.event_name != 'workflow_dispatch' || (github.event_name == 'workflow_dispatch' && github.event.inputs.run-tests != 'false') }}
uses: MishaKav/[email protected]
with:
pytest-coverage-path: ./test_coverage.txt
Expand Down

0 comments on commit 0d5ebc2

Please sign in to comment.