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:
parent
cb8e009c14
commit
5b7a89d8fc
1 changed files with 9 additions and 10 deletions
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
|
@ -98,7 +98,6 @@ jobs:
|
||||||
job_install_deps:
|
job_install_deps:
|
||||||
name: Install Dependencies
|
name: Install Dependencies
|
||||||
needs: job_get_metadata
|
needs: job_get_metadata
|
||||||
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
|
@ -136,7 +135,7 @@ jobs:
|
||||||
job_lint:
|
job_lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [job_get_metadata, job_install_deps]
|
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
|
name: Lint
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
@ -170,7 +169,7 @@ jobs:
|
||||||
job_admin-tests:
|
job_admin-tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [job_get_metadata, job_install_deps]
|
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
|
name: Admin tests - Chrome
|
||||||
env:
|
env:
|
||||||
MOZ_HEADLESS: 1
|
MOZ_HEADLESS: 1
|
||||||
|
@ -211,7 +210,7 @@ jobs:
|
||||||
job_unit-tests:
|
job_unit-tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [job_get_metadata, job_install_deps]
|
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:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node: [ '16.13.0', '18.12.1' ]
|
node: [ '16.13.0', '18.12.1' ]
|
||||||
|
@ -249,7 +248,7 @@ jobs:
|
||||||
job_database-tests:
|
job_database-tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [job_get_metadata, job_install_deps]
|
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:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node: [ '16.13.0', '18.12.1' ]
|
node: [ '16.13.0', '18.12.1' ]
|
||||||
|
@ -370,7 +369,7 @@ jobs:
|
||||||
job_regression-tests:
|
job_regression-tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [job_get_metadata, job_install_deps]
|
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:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
@ -433,7 +432,7 @@ jobs:
|
||||||
job_admin_x_settings:
|
job_admin_x_settings:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [job_get_metadata, job_install_deps]
|
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
|
name: Admin-X Settings tests
|
||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
|
@ -486,7 +485,7 @@ jobs:
|
||||||
job_comments_ui:
|
job_comments_ui:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [job_get_metadata, job_install_deps]
|
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
|
name: Comments-UI tests
|
||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
|
@ -539,7 +538,7 @@ jobs:
|
||||||
job_signup_form:
|
job_signup_form:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [job_get_metadata, job_install_deps]
|
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
|
name: Signup-form tests
|
||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
|
@ -592,7 +591,7 @@ jobs:
|
||||||
job_ghost-cli:
|
job_ghost-cli:
|
||||||
name: Ghost-CLI tests
|
name: Ghost-CLI tests
|
||||||
needs: [job_get_metadata, job_install_deps]
|
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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
Loading…
Add table
Reference in a new issue