name: build
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  build:
    name: build
    runs-on: ubuntu-latest
    steps:
      - name: checkout
        uses: actions/checkout@v2
      - name: set up Node environment for npm
        uses: actions/setup-node@v1
        with:
          node-version: 12
      - name: install dependencies
        run: yarn install
      - name: build
        run: yarn build
      - name: lint
        run: yarn lint
      - name: test
        run: |
          yarn build
          yarn test:coverage
      - name: publish codecov
        run: yarn codecov -f coverage/*.json
