1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2024-11-15 01:25:25 +01:00

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

View File

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