Required locale in addTranslations() #521
Workflow file for this run
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
name: CI/CD | |
on: | |
push: | |
branches: | |
- main | |
- 'v*' | |
tags: | |
- '*' | |
pull_request: | |
env: | |
NODE_VERSION: 18 | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package-location: | |
- 'docs/ember-intl' | |
- 'docs/my-app' | |
- 'docs/my-app-with-lazy-loaded-translations' | |
- 'docs/my-app-with-namespace-from-folders' | |
- 'docs/my-classic-app' | |
- 'docs/my-v1-addon' | |
- 'docs/my-v1-engine' | |
- 'docs/my-v2-addon' | |
- 'packages/ember-intl' | |
- 'tests/ember-intl' | |
- 'tests/ember-intl-node' | |
timeout-minutes: 5 | |
steps: | |
- name: Check out a copy of the repo | |
uses: actions/checkout@v4 | |
- name: Set up pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: latest | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'pnpm' | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Lint | |
run: pnpm lint | |
working-directory: ${{ matrix.package-location }} | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package-location: | |
- 'docs/ember-intl' | |
- 'docs/my-app' | |
- 'docs/my-app-with-lazy-loaded-translations' | |
- 'docs/my-app-with-namespace-from-folders' | |
- 'docs/my-classic-app' | |
- 'docs/my-v1-addon' | |
- 'docs/my-v1-engine' | |
- 'docs/my-v2-addon' | |
- 'packages/ember-intl' | |
- 'tests/ember-intl' | |
- 'tests/ember-intl-node' | |
timeout-minutes: 5 | |
steps: | |
- name: Check out a copy of the repo | |
uses: actions/checkout@v4 | |
- name: Set up pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: latest | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'pnpm' | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Test | |
run: pnpm test | |
working-directory: ${{ matrix.package-location }} | |
test-compatibility: | |
name: Test compatibility | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
scenario: | |
- 'ember-lts-3.28' | |
- 'ember-lts-4.12' | |
- 'ember-lts-5.4' | |
- 'ember-release' | |
- 'ember-beta' | |
- 'ember-canary' | |
- 'embroider-safe' | |
- 'embroider-optimized' | |
timeout-minutes: 7 | |
steps: | |
- name: Check out a copy of the repo | |
uses: actions/checkout@v4 | |
- name: Set up pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: latest | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'pnpm' | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Test | |
run: pnpm test:ember-compatibility ${{ matrix.scenario }} --- pnpm test | |
working-directory: 'tests/ember-intl' | |
test-ember-intl-node-windows: | |
name: Test (tests/ember-intl-node, Windows) | |
runs-on: windows-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Check out a copy of the repo | |
uses: actions/checkout@v4 | |
- name: Set up pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: latest | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'pnpm' | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Test | |
run: pnpm test | |
working-directory: 'tests/ember-intl-node' | |
deploy-documentation: | |
name: Deploy documentation | |
runs-on: ubuntu-latest | |
needs: [lint, test, test-compatibility, test-ember-intl-node-windows] | |
timeout-minutes: 5 | |
# Only run on pushes to the main branch or a tag (i.e. ignore pull requests and cron) | |
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) | |
steps: | |
- name: Check out a copy of the repo | |
uses: actions/checkout@v4 | |
- name: Set a Git user | |
run: | | |
# Set a Git user for committing | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "actions@users.noreply.github.com" | |
# Copy the Git Auth from the local config | |
git config --global "http.https://github.com/.extraheader" \ | |
"$(git config --local --get http.https://github.com/.extraheader)" | |
- name: Set the version path | |
# 'main' or 'v1.2.3' | |
run: echo "ADDON_DOCS_VERSION_PATH=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
- name: Set up pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: latest | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'pnpm' | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Deploy the latest documentation | |
if: github.ref == 'refs/heads/main' | |
run: pnpm release:documentation --activate --verbose | |
working-directory: 'docs/ember-intl' | |
env: | |
# Rebuild the demo application | |
ADDON_DOCS_UPDATE_LATEST: 'true' | |
- name: Deploy the tagged documentation | |
if: startsWith(github.ref, 'refs/tags/') | |
run: pnpm release:documentation --activate --verbose | |
working-directory: 'docs/ember-intl' |