38 lines
954 B
YAML
38 lines
954 B
YAML
name: build
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [10.x, 12.x, 14.x, 15.x]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
registry-url: https://registry.npmjs.org
|
|
scope: '@payloadcms'
|
|
always-auth: true
|
|
- name: Cache node modules
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.npm
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
|
${{ runner.os }}-build-
|
|
${{ runner.os }}-
|
|
- run: yarn
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
- run: yarn build
|
|
- run: yarn test:client
|
|
- run: yarn test:int # In-memory db + api tests
|
|
env:
|
|
CI: true
|