diff --git a/.github/workflows/validate-pr.yml b/.github/workflows/validate-pr.yml index 16b75fcc8..9fd98ab09 100644 --- a/.github/workflows/validate-pr.yml +++ b/.github/workflows/validate-pr.yml @@ -6,10 +6,6 @@ on: - develop - main -env: - NODE_OPTIONS: '--max-old-space-size=4096' - CHOKIDAR_USEPOLLING: 1 - jobs: build: name: Gatsby Build @@ -50,6 +46,32 @@ jobs: GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES: true CI: true + test: + name: Run Tests + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 12 + + - name: Cache dependencies + id: yarn-cache + uses: actions/cache@v2 + with: + path: '**/node_modules' + key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} + + - name: Install dependencies + if: steps.yarn-cache.outputs.cache-hit != 'true' + run: yarn install --frozen-lockfile + + - name: Jest test + run: yarn test --passWithNoTests + lint: name: Run Eslint runs-on: ubuntu-latest