From c69a1cb483d6c5aba6cbe1aba196dc71fc60d9d2 Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Tue, 8 Jun 2021 17:57:27 +0200 Subject: [PATCH] test: enable testing for upcoming challenges (#42360) * test: enable testing for upcoming challenges * fix: enable SHOW_UPCOMING_CHANGES during test * Revert "fix: enable SHOW_UPCOMING_CHANGES during test" This reverts commit f1bd00fdbae6712cd4d3f95caa75330d2fae28ac. * Revert "test: enable testing for upcoming challenges" This reverts commit d0409fef66f1e3dcfc9c82a3a24c8e695cdb0751. * feat: test upcoming changes in separate job --- .github/workflows/node.js-tests.yml | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/.github/workflows/node.js-tests.yml b/.github/workflows/node.js-tests.yml index e5b95f56d0..b1c56b7ac1 100644 --- a/.github/workflows/node.js-tests.yml +++ b/.github/workflows/node.js-tests.yml @@ -89,6 +89,51 @@ jobs: - name: Run Tests run: npm test + test-upcoming: + name: Test Upcoming Changes + needs: lint + runs-on: ubuntu-18.04 + + strategy: + matrix: + node-version: [14.x] + + 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 + echo 'SHOW_UPCOMING_CHANGES=true' >> .env + + - name: Install Dependencies + run: | + npm ci + npm run ensure-env + npm run build:curriculum + + - name: Run Tests + run: npm test + test-localization: name: Localize needs: lint