diff --git a/.github/workflows/.tests.yml b/.github/workflows/.tests.yml index 259a7e95d..7779cbd27 100644 --- a/.github/workflows/.tests.yml +++ b/.github/workflows/.tests.yml @@ -3,12 +3,17 @@ name: .Tests on: workflow_call: inputs: - ### Typical / recommended + ### Required target: description: PR number, test or prod + required: true + type: string + + ### Typical / recommended + triggers: + description: Bash array to diff for build triggering; omit to always fire required: false type: string - default: test env: DOMAIN: apps.silver.devops.gov.bc.ca diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 28ac260e2..f082445dc 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -43,8 +43,10 @@ jobs: triggers: ('backend/' 'frontend/' 'migrations/') params: --set global.secrets.persist=false + tests: name: Tests + if: needs.deploys.triggered == 'true' needs: [deploys] uses: ./.github/workflows/.tests.yml with: @@ -52,6 +54,7 @@ jobs: results: name: PR Results + if: always() || !failure() needs: [tests] runs-on: ubuntu-22.04 steps: diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 2f447fdb8..f83e1f3a4 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -96,6 +96,8 @@ jobs: tests: name: Tests uses: ./.github/workflows/.tests.yml + with: + target: test zap_scan: runs-on: ubuntu-latest