mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Added CI check to ensure i18n translations are in sync
fixes https://github.com/TryGhost/DevOps/issues/91 - this adds a CI job that will run i18n tests if any of the packages that use it have changed - this helps prevent translations from going out of sync
This commit is contained in:
parent
0a2b8cdbd3
commit
c5c6f84c7d
2 changed files with 27 additions and 3 deletions
25
.github/workflows/ci.yml
vendored
25
.github/workflows/ci.yml
vendored
|
@ -217,6 +217,29 @@ jobs:
|
||||||
env:
|
env:
|
||||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||||
|
|
||||||
|
job_i18n:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [job_get_metadata, job_install_deps]
|
||||||
|
name: i18n
|
||||||
|
if: |
|
||||||
|
needs.job_get_metadata.outputs.changed_comments_ui == 'true'
|
||||||
|
|| needs.job_get_metadata.outputs.changed_signup_form == 'true'
|
||||||
|
|| needs.job_get_metadata.outputs.changed_portal == 'true'
|
||||||
|
|| needs.job_get_metadata.outputs.changed_core == 'true'
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: "18.12.1"
|
||||||
|
|
||||||
|
- name: Restore caches
|
||||||
|
uses: ./.github/actions/restore-cache
|
||||||
|
env:
|
||||||
|
DEPENDENCY_CACHE_KEY: ${{ needs.job_install_deps.outputs.dependency_cache_key }}
|
||||||
|
|
||||||
|
- name: Run i18n tests
|
||||||
|
run: yarn nx run @tryghost/i18n:test
|
||||||
|
|
||||||
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]
|
||||||
|
@ -832,11 +855,13 @@ jobs:
|
||||||
job_get_metadata,
|
job_get_metadata,
|
||||||
job_install_deps,
|
job_install_deps,
|
||||||
job_lint,
|
job_lint,
|
||||||
|
job_i18n,
|
||||||
job_ghost-cli,
|
job_ghost-cli,
|
||||||
job_admin-tests,
|
job_admin-tests,
|
||||||
job_unit-tests,
|
job_unit-tests,
|
||||||
job_database-tests,
|
job_database-tests,
|
||||||
job_regression-tests,
|
job_regression-tests,
|
||||||
|
job_browser-tests,
|
||||||
job_admin_x_settings,
|
job_admin_x_settings,
|
||||||
job_comments_ui,
|
job_comments_ui,
|
||||||
job_signup_form,
|
job_signup_form,
|
||||||
|
|
|
@ -8,9 +8,8 @@
|
||||||
"types": "./build/i18n.d.ts",
|
"types": "./build/i18n.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "echo \"Implement me!\"",
|
"dev": "echo \"Implement me!\"",
|
||||||
"test:unit:base": "NODE_ENV=testing c8 --include index.js --include lib --check-coverage --100 --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
|
"test:base": "NODE_ENV=testing c8 --include index.js --include lib --check-coverage --100 --reporter text --reporter cobertura -- mocha --reporter dot './test/**/*.test.js'",
|
||||||
"test:unit": "yarn test:unit:base && yarn translate",
|
"test": "yarn test:base && yarn translate",
|
||||||
"test": "yarn test:unit",
|
|
||||||
"lint:code": "eslint *.js lib/ --ext .js --cache",
|
"lint:code": "eslint *.js lib/ --ext .js --cache",
|
||||||
"lint": "yarn lint:code && yarn lint:test",
|
"lint": "yarn lint:code && yarn lint:test",
|
||||||
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache",
|
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache",
|
||||||
|
|
Loading…
Add table
Reference in a new issue