mirror of
https://github.com/kremalicious/portfolio.git
synced 2024-11-14 17:15:15 +01:00
split up test & build
This commit is contained in:
parent
ec0f1aa0d3
commit
23e18b9539
@ -1,4 +1,4 @@
|
||||
name: Test
|
||||
name: 'CI/CD Pipeline'
|
||||
|
||||
on: [push]
|
||||
|
||||
@ -6,6 +6,31 @@ 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 }}-
|
||||
|
||||
- run: npm ci
|
||||
- run: npm test
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: ['10', '12', '13']
|
||||
@ -32,8 +57,6 @@ jobs:
|
||||
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 }}
|
Loading…
Reference in New Issue
Block a user