mirror of
https://github.com/kremalicious/portfolio.git
synced 2024-11-15 01:25:25 +01:00
40 lines
960 B
YAML
40 lines
960 B
YAML
name: Test
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: ['10', '12', '13']
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Cache node modules
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.npm
|
|
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: ${{ runner.os }}-node-${{ matrix.node-version }}-
|
|
|
|
- name: Cache Gatsby build output
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: public
|
|
key: ${{ runner.os }}-${{ matrix.node-version }}-public
|
|
|
|
- run: npm ci
|
|
- run: npm test
|
|
- run: npm run build
|
|
env:
|
|
CI: true
|
|
GATSBY_GITHUB_TOKEN: ${{ secrets.GATSBY_GITHUB_TOKEN }}
|