-
Notifications
You must be signed in to change notification settings - Fork 916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add i18n checks to PR workflows #8411
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ env: | |
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first' | ||
|
||
jobs: | ||
build-lint-test: | ||
build-test: | ||
name: Build and Verify on ${{ matrix.name }} (ciGroup${{ matrix.group }}) | ||
strategy: | ||
fail-fast: false | ||
|
@@ -104,18 +104,6 @@ jobs: | |
if: matrix.os == 'windows-latest' | ||
run: yarn osd bootstrap || yarn osd bootstrap | ||
|
||
- name: Run linter | ||
# ciGroup 1 of unit-tests is shorter and Linux is faster | ||
if: matrix.group == 1 && matrix.os == 'ubuntu-latest' | ||
id: linter | ||
run: yarn lint | ||
|
||
- name: Validate NOTICE file | ||
# ciGroup 1 of unit-tests is shorter and Linux is faster | ||
if: matrix.group == 1 && matrix.os == 'ubuntu-latest' | ||
id: notice-validate | ||
run: yarn notice:validate | ||
|
||
- name: Run unit tests group ${{ matrix.group }} with coverage | ||
id: unit-tests | ||
run: yarn test:jest:ci:coverage --ci-group=${{ matrix.group }} | ||
|
@@ -140,6 +128,51 @@ jobs: | |
id: integration-tests | ||
run: yarn test:jest_integration:ci | ||
|
||
lint-and-validate: | ||
name: Lint and validate | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Setup Yarn | ||
run: | | ||
npm uninstall -g yarn | ||
npm i -g [email protected] | ||
yarn config set network-timeout 1000000 -g | ||
|
||
- name: Configure Yarn Cache | ||
run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV | ||
|
||
- name: Initialize Yarn Cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.YARN_CACHE_LOCATION }} | ||
key: yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
yarn- | ||
|
||
- name: Run bootstrap | ||
run: yarn osd bootstrap | ||
|
||
- name: Run linter | ||
id: linter | ||
run: yarn lint | ||
|
||
- name: Validate NOTICE file | ||
id: notice-validate | ||
run: yarn notice:validate | ||
|
||
- name: Check i18n | ||
id: i18n-check | ||
run: yarn i18n:check | ||
|
||
functional-tests: | ||
name: Run functional tests on ${{ matrix.name }} (ciGroup${{ matrix.group }}) | ||
strategy: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
infra: | ||
- Add i18n checks to PR workflows ([#8411](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8411)) | ||
|
||
feat: | ||
- Ignore missing `formats` while checking locale files ([#8411](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8411)) | ||
- Add help text and description to `i18n-check` ([#8411](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8411)) | ||
|
||
fix: | ||
- Fix malformed translations ([#8411](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8411)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems changed the existing behavior, is it by intention?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. If
true
, it exits at the first error. When false, it logs them all and then finally throws.While "checking" we would rather have all of the problems shown to us, as opposed to just the first problem.