name: CI
on: [push, pull_request]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Setup Node.js environment
        uses: actions/setup-node@v2
      - run: sudo npm install -g typescript nyc mocha
      - run: npm install
      - run: npm run build
      - run: npm run lint
      - run: npm run test
      - run: mkdir ./coverage && npm run coverage > ./coverage/lcov.info
      - name: Coveralls
        uses: coverallsapp/github-action@v2
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}

