1
0
mirror of synced 2025-12-30 03:01:36 -05:00

Create languages src directory (#41661)

This commit is contained in:
Kevin Heis
2023-08-30 10:24:59 -07:00
committed by GitHub
parent df293570e7
commit 9bf3fc185a
108 changed files with 153 additions and 134 deletions

View File

@@ -46,4 +46,4 @@ jobs:
if: ${{ !inputs.nuke_all }}
env:
LANGUAGES: ${{ inputs.languages }}
run: .github/actions-scripts/purge-fastly-edge-cache-per-language.js
run: src/languages/scripts/purge-fastly-edge-cache-per-language.js

View File

@@ -34,9 +34,9 @@ jobs:
id: set-matrix
with:
script: |
// We only want to run the 'translations' suite when we know
// We only want to run the 'languages' suite when we know
// we're on the private docs-internal repo because only that
// one has ability to clone the remote (private) translations
// one has ability to clone the remote (private) languages
// repos.
// You can run multiple paths per suite as space-separated in `path`.
// Note that *if you add* to this, remember to also add that
@@ -64,7 +64,7 @@ jobs:
{ name: 'search', path: 'src/search/tests', },
{ name: 'shielding', path: 'src/shielding/tests', },
context.payload.repository.full_name === 'github/docs-internal' &&
{ name: 'translations', path: 'tests/translations', },
{ name: 'languages', path: 'src/languages/tests', },
{ name: 'unit', path: 'tests/unit', },
// { name: 'tools', path: 'src/tools/tests', }
{ name: 'webhooks', path: 'src/webhooks/tests', },
@@ -88,7 +88,7 @@ jobs:
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- uses: ./.github/actions/setup-elasticsearch
if: ${{ matrix.name == 'search' || matrix.name == 'translations' }}
if: ${{ matrix.name == 'search' || matrix.name == 'languages' }}
- uses: ./.github/actions/node-npm-setup
@@ -117,7 +117,7 @@ jobs:
tests/fixtures/data
- name: Clone all translations
if: ${{ matrix.name == 'translations' }}
if: ${{ matrix.name == 'languages' }}
uses: ./.github/actions/clone-translations
with:
token: ${{ secrets.DOCS_BOT_PAT_READPUBLICKEY }}
@@ -169,7 +169,7 @@ jobs:
- name: Index fixtures into the local Elasticsearch
# For the sake of saving time, only run this step if the group
# is one that will run tests against an Elasticsearch on localhost.
if: ${{ matrix.name == 'search' || matrix.name == 'translations' }}
if: ${{ matrix.name == 'search' || matrix.name == 'languages' }}
run: npm run index-test-fixtures
- name: Run tests
@@ -178,8 +178,8 @@ jobs:
CHANGELOG_CACHE_FILE_PATH: tests/fixtures/changelog-feed.json
# By default, when `process.env.NODE_ENV === 'test'` it forces the
# tests run only in English. The exception is the
# `tests/translations/` suite which needs all languages to be set up.
ENABLED_LANGUAGES: ${{ matrix.name == 'translations' && 'all' || '' }}
# `languages` suite which needs all languages to be set up.
ENABLED_LANGUAGES: ${{ matrix.name == 'languages' && 'all' || '' }}
ROOT: ${{ (matrix.name == 'rendering-fixtures' || matrix.name == 'pageinfo' || matrix.name == 'landings' ) && 'tests/fixtures' || '' }}
TRANSLATIONS_FIXTURE_ROOT: ${{ (matrix.name == 'rendering-fixtures' || matrix.name == 'pageinfo') && 'tests/fixtures/translations' || '' }}
run: npm test -- ${{ matrix.path }}/