Skip to content

fix: ci test

fix: ci test #26

Workflow file for this run

name: test
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
# strategy:
# matrix:
# node-version: [16.x, 18.x]
steps:
- uses: actions/checkout@v3
# - name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
# node-version: ${{ matrix.node-version }}
- name: npm install
run: npm install
- name: Build
run: npm run build
- name: Test
run: |
npm run coverage -- --noOpen
- name: out lcov file
run: npx nyc report --reporter=text-lcov > ./coverage/test.lcov
# # 手动调 coveralls
# - name: Coveralls
# env:
# COVERALLS_SERVICE_NAME: 'GitHub CI'
# COVERALLS_GIT_BRANCH: master
# COVERALLS_REPO_TOKEN : ${{ secrets.COVERALLS_REPO_TOKEN }}
# NODE_COVERALLS_DEBUG: 0 # or 1 for verbsoe
# run: |
# npm install coveralls -g
# cat ./coverage/test.lcov | coveralls
- name: Coveralls
uses: coverallsapp/github-action@v2
# with:
# github-token: ${{ github.token }}
# debug: true
# Badge:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - name: out lcov file
# run: npx nyc report --reporter=text-lcov > ./coverage/test.lcov
# - name: Coveralls
# uses: coverallsapp/github-action@v2
# with:
# # github-token: ${{ github.token }}
# debug: true