Skip to content

Commit

Permalink
feat: add jest tests to validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Cayla Hamann committed Jan 29, 2021
1 parent b54cdfb commit 2970f60
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions .github/workflows/validate-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ on:
- develop
- main

env:
NODE_OPTIONS: '--max-old-space-size=4096'
CHOKIDAR_USEPOLLING: 1

jobs:
build:
name: Gatsby Build
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2970f60

Please sign in to comment.