Skip to content

Commit

Permalink
add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
zuies committed May 29, 2023
1 parent 13ecdf8 commit 85b6f54
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: build

on:
push:
branches:
- master
tags:
- '!*'
paths:
- src/*
- '*.json'
- package-lock.json
pull_request:
paths:
- '!*.MD'

jobs:
test:
strategy:
matrix:
platform: [ubuntu-latest, macOS-latest]
node: ['18', '17']
name: test/node ${{ matrix.node }}/${{ matrix.platform }}
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm run test
- run: npm run build

coverage:
needs: [test]
name: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '17'
- run: npm install
- run: npm run build
- uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: npm run coverage
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"start": "next start",
"lint": "eslint --ext .ts,.tsx",
"test": "jest",
"coverage": "jest --coverage",
"export": "next export"
},
"dependencies": {
Expand Down

0 comments on commit 85b6f54

Please sign in to comment.