2020-12-27 17:40:00 +01:00
|
|
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
|
|
|
|
|
|
|
name: 'Node.js CI'
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [master, develop]
|
|
|
|
pull_request_review:
|
|
|
|
branches: [master, develop]
|
|
|
|
types: [submitted]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
ci_app:
|
|
|
|
if: ${{ (github.event_name == 'push') || (github.event_name == 'pull_request_review' && github.event.review.state == 'approved' && (github.event.review.author_association == 'COLLABORATOR' || github.event.review.author_association == 'MEMBER' || github.event.review.author_association == 'OWNER') && !github.event.pull_request.draft && github.event.pull_request.state == 'open') }}
|
2021-02-14 19:28:15 +01:00
|
|
|
runs-on: 'ubuntu-latest'
|
2020-12-27 17:40:00 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version: [14.x]
|
|
|
|
steps:
|
2021-05-12 16:41:03 +02:00
|
|
|
- uses: 'actions/checkout@v2.3.4'
|
2020-12-27 17:40:00 +01:00
|
|
|
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
2021-02-23 11:09:02 +01:00
|
|
|
uses: 'actions/setup-node@v2.1.5'
|
2020-12-27 17:40:00 +01:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
|
|
|
|
- name: 'Cache dependencies'
|
2021-04-14 14:10:26 +02:00
|
|
|
uses: 'actions/cache@v2.1.5'
|
2020-12-27 17:40:00 +01:00
|
|
|
with:
|
2021-03-08 14:33:53 +01:00
|
|
|
path: '.npm'
|
|
|
|
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
2020-12-27 17:40:00 +01:00
|
|
|
|
|
|
|
- name: 'Install dependencies'
|
2021-03-08 14:33:53 +01:00
|
|
|
run: 'npm ci --cache .npm --prefer-offline'
|
2020-12-27 17:40:00 +01:00
|
|
|
|
2021-03-19 14:07:21 +01:00
|
|
|
- run: 'npm run lint:editorconfig'
|
|
|
|
- run: 'npm run lint:markdown'
|
|
|
|
- run: 'npm run lint'
|
|
|
|
- run: 'npm run build'
|
|
|
|
- run: 'npm test'
|
2021-05-12 16:41:17 +02:00
|
|
|
- uses: 'codecov/codecov-action@v1.5.0'
|