2021-01-26 15:57:03 +01:00
|
|
|
name: 'CI'
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2022-03-30 12:17:34 +02:00
|
|
|
- main
|
|
|
|
- v4
|
2021-01-26 15:57:03 +01:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '**'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup Node.js
|
2021-05-25 14:08:48 +02:00
|
|
|
uses: actions/setup-node@v2
|
2021-01-26 15:57:03 +01:00
|
|
|
with:
|
|
|
|
node-version: '14'
|
|
|
|
|
|
|
|
- name: Cache node modules
|
2021-05-25 14:08:48 +02:00
|
|
|
uses: actions/cache@v2
|
|
|
|
env:
|
|
|
|
cache-name: cache-node-modules
|
2021-01-26 15:57:03 +01:00
|
|
|
with:
|
|
|
|
path: ~/.npm
|
2021-05-25 14:08:48 +02:00
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-
|
2021-01-26 15:57:03 +01:00
|
|
|
|
|
|
|
- run: npm ci
|
|
|
|
- run: npm test
|
|
|
|
- run: npm run build
|
2021-01-26 16:06:35 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|