2021-09-17 16:09:29 +08:00
|
|
|
name: CI
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
pull_request:
|
|
|
|
branches: [main]
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: "12"
|
2021-09-17 16:46:10 +08:00
|
|
|
- name: install dependencies
|
|
|
|
run: yarn install
|
2021-09-17 16:09:29 +08:00
|
|
|
- name: run test
|
2021-09-23 11:11:48 +08:00
|
|
|
uses: mattallty/jest-github-action@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
test-command: "yarn test:ci"
|
2021-09-23 11:17:38 +08:00
|
|
|
coverage-comment: ${{ github.event_name == 'pull_request'}}
|