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

split up test & build

This commit is contained in:
Matthias Kretschmann 2019-11-26 01:05:58 +01:00
parent ec0f1aa0d3
commit 23e18b9539
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -1,4 +1,4 @@
name: Test name: 'CI/CD Pipeline'
on: [push] on: [push]
@ -6,6 +6,31 @@ jobs:
test: test:
runs-on: ubuntu-latest 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 }}-
- run: npm ci
- run: npm test
build:
runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
node-version: ['10', '12', '13'] node-version: ['10', '12', '13']
@ -32,8 +57,6 @@ jobs:
key: ${{ runner.os }}-${{ matrix.node-version }}-public key: ${{ runner.os }}-${{ matrix.node-version }}-public
- run: npm ci - run: npm ci
- run: npm test
- run: npm run build - run: npm run build
env: env:
CI: true
GATSBY_GITHUB_TOKEN: ${{ secrets.GATSBY_GITHUB_TOKEN }} GATSBY_GITHUB_TOKEN: ${{ secrets.GATSBY_GITHUB_TOKEN }}