-
Notifications
You must be signed in to change notification settings - Fork 21
36 lines (34 loc) · 967 Bytes
/
test.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
name: Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v4
- name: Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install -g yarn
- run: yarn
- run: yarn run eslint
- run: yarn global add mocha
- name: Run yarn test
if: ${{ !startsWith(matrix.node-version, '18') }}
run: yarn test
- name: Run yarn coverage
if: ${{ startsWith(matrix.node-version, '18') }}
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: 0d3707693eec3617898169fa9d7f91a86d5a98a252beb81bd9fe89009647a456
with:
coverageCommand: yarn coverage
coverageLocations: ${{ github.workspace }}/coverage/lcov.info:lcov