artifact tests

This commit is contained in:
Matthias Kretschmann 2019-11-26 01:20:37 +01:00
parent 23e18b9539
commit 6ea49bd0db
Signed by: m
GPG Key ID: 606EEEF3C479A91F
1 changed files with 14 additions and 17 deletions

View File

@ -6,24 +6,20 @@ 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 }}
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
node-version: '13.x'
- 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 }}-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- run: npm ci
- run: npm test
@ -31,32 +27,33 @@ jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['10', '12', '13']
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
node-version: '13.x'
- 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 }}-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- name: Cache Gatsby build output
uses: actions/cache@v1
with:
path: public
key: ${{ runner.os }}-${{ matrix.node-version }}-public
key: ${{ runner.os }}-public
- run: npm ci
- run: npm run build
env:
GATSBY_GITHUB_TOKEN: ${{ secrets.GATSBY_GITHUB_TOKEN }}
- uses: actions/upload-artifact@v1
with:
name: public
path: public