0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Deduplicated execution check in CI workflow

- we only need this on the metadata step because it trickles down to the
  other workflows that depend on it
This commit is contained in:
Daniel Lockyer 2023-07-07 16:17:10 +02:00 committed by Daniel Lockyer
parent cb8e009c14
commit 5b7a89d8fc

View file

@ -98,7 +98,6 @@ jobs:
job_install_deps:
name: Install Dependencies
needs: job_get_metadata
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
@ -136,7 +135,7 @@ jobs:
job_lint:
runs-on: ubuntu-latest
needs: [job_get_metadata, job_install_deps]
if: needs.job_get_metadata.outputs.changed_any_code == 'true' && (github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/')))
if: needs.job_get_metadata.outputs.changed_any_code == 'true'
name: Lint
steps:
- uses: actions/checkout@v3
@ -170,7 +169,7 @@ jobs:
job_admin-tests:
runs-on: ubuntu-latest
needs: [job_get_metadata, job_install_deps]
if: needs.job_get_metadata.outputs.changed_admin == 'true' && (github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/')))
if: needs.job_get_metadata.outputs.changed_admin == 'true'
name: Admin tests - Chrome
env:
MOZ_HEADLESS: 1
@ -211,7 +210,7 @@ jobs:
job_unit-tests:
runs-on: ubuntu-latest
needs: [job_get_metadata, job_install_deps]
if: needs.job_get_metadata.outputs.changed_any_code == 'true' && (github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/')))
if: needs.job_get_metadata.outputs.changed_any_code == 'true'
strategy:
matrix:
node: [ '16.13.0', '18.12.1' ]
@ -249,7 +248,7 @@ jobs:
job_database-tests:
runs-on: ubuntu-latest
needs: [job_get_metadata, job_install_deps]
if: needs.job_get_metadata.outputs.changed_core == 'true' && (github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/')))
if: needs.job_get_metadata.outputs.changed_core == 'true'
strategy:
matrix:
node: [ '16.13.0', '18.12.1' ]
@ -370,7 +369,7 @@ jobs:
job_regression-tests:
runs-on: ubuntu-latest
needs: [job_get_metadata, job_install_deps]
if: needs.job_get_metadata.outputs.changed_core == 'true' && (github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/')))
if: needs.job_get_metadata.outputs.changed_core == 'true'
strategy:
matrix:
include:
@ -433,7 +432,7 @@ jobs:
job_admin_x_settings:
runs-on: ubuntu-latest
needs: [job_get_metadata, job_install_deps]
if: needs.job_get_metadata.outputs.changed_admin_x_settings == 'true' && (github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/')))
if: needs.job_get_metadata.outputs.changed_admin_x_settings == 'true'
name: Admin-X Settings tests
env:
CI: true
@ -486,7 +485,7 @@ jobs:
job_comments_ui:
runs-on: ubuntu-latest
needs: [job_get_metadata, job_install_deps]
if: needs.job_get_metadata.outputs.changed_comments_ui == 'true' && (github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/')))
if: needs.job_get_metadata.outputs.changed_comments_ui == 'true'
name: Comments-UI tests
env:
CI: true
@ -539,7 +538,7 @@ jobs:
job_signup_form:
runs-on: ubuntu-latest
needs: [job_get_metadata, job_install_deps]
if: needs.job_get_metadata.outputs.changed_signup_form == 'true' && (github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/')))
if: needs.job_get_metadata.outputs.changed_signup_form == 'true'
name: Signup-form tests
env:
CI: true
@ -592,7 +591,7 @@ jobs:
job_ghost-cli:
name: Ghost-CLI tests
needs: [job_get_metadata, job_install_deps]
if: needs.job_get_metadata.outputs.changed_core == 'true' && (github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/')))
if: needs.job_get_metadata.outputs.changed_core == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3