-
Notifications
You must be signed in to change notification settings - Fork 7
46 lines (41 loc) · 1.18 KB
/
testing.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Node CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-18.04
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: |
npm ci
cp app/src/_bananas.settings.js app/src/bananas.settings.js
- name: Lint JS
run: |
npm run eslint
- name: Run tests
run: |
npm run coverage
- name: Report coverage
if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'synchronize')
uses: 5monkeys/cobertura-action@v7
with:
path: coverage/cobertura-coverage.xml
repo_token: ${{ secrets.GITHUB_TOKEN }}
minimum_coverage: 20