2019-11-13 18:53:31 +01:00
|
|
|
name: Test
|
2019-11-13 18:43:58 +01:00
|
|
|
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
2019-11-14 01:22:14 +01:00
|
|
|
test:
|
2019-11-13 18:43:58 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2019-11-13 18:53:31 +01:00
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
2019-11-14 01:22:14 +01:00
|
|
|
node-version: '12.x'
|
2019-11-13 18:53:31 +01:00
|
|
|
|
|
|
|
- name: Cache node modules
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
2019-11-14 01:02:49 +01:00
|
|
|
path: ~/.npm
|
|
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
2019-11-14 01:22:14 +01:00
|
|
|
restore-keys: ${{ runner.os }}-node-
|
2019-11-14 01:02:49 +01:00
|
|
|
|
|
|
|
- name: Cache Gatsby build output
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: public
|
|
|
|
key: ${{ runner.os }}-public
|
2019-11-13 18:53:31 +01:00
|
|
|
|
|
|
|
- name: Install Dependencies
|
2019-11-14 01:02:49 +01:00
|
|
|
run: npm ci
|
|
|
|
|
2019-11-13 18:53:31 +01:00
|
|
|
- name: Test
|
2019-11-14 01:02:49 +01:00
|
|
|
run: npm test
|
|
|
|
|
2019-11-13 18:53:31 +01:00
|
|
|
- name: Build
|
2019-11-14 01:22:14 +01:00
|
|
|
run: npm run build
|
2019-11-13 18:53:31 +01:00
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
GATSBY_GITHUB_TOKEN: ${{ secrets.GATSBY_GITHUB_TOKEN }}
|