diff --git a/.github/workflows/node.js-tests.yml b/.github/workflows/node.js-tests.yml index aa32aabd1c..fdcec55331 100644 --- a/.github/workflows/node.js-tests.yml +++ b/.github/workflows/node.js-tests.yml @@ -84,3 +84,53 @@ jobs: - name: Run Tests run: npm test + + test-localization: + name: Localize + needs: lint + runs-on: ubuntu-18.04 + + strategy: + matrix: + node-version: [14.x] + locale: [chinese, espanol] + + steps: + - name: Checkout Source Files + uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Set Environment variables + run: cp sample.env .env + + - name: Install Dependencies + env: + CURRICULUM_LOCALE: ${{ matrix.locale }} + CLIENT_LOCALE: ${{ matrix.locale }} + run: | + npm ci + npm run ensure-env + npm run build:curriculum + + - name: Run Tests + env: + CURRICULUM_LOCALE: ${{ matrix.locale }} + CLIENT_LOCALE: ${{ matrix.locale }} + run: npm test