build.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. name: build
  2. on:
  3. push:
  4. branches: ['*']
  5. tags: ['v[0-9]+.[0-9]+.[0-9]+']
  6. pull_request:
  7. jobs:
  8. build:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - name: Checkout
  12. uses: actions/checkout@v2
  13. - uses: actions/setup-node@v1
  14. with:
  15. node-version: 12
  16. - run: yarn install
  17. - run: yarn download
  18. - run: cp .env.example .env
  19. - run: npx ganache-cli > /dev/null &
  20. - run: npm run migrate:dev
  21. - run: yarn test
  22. - run: node src/cli.js test
  23. - run: yarn lint
  24. - run: yarn coverage
  25. - name: Coveralls
  26. uses: coverallsapp/github-action@master
  27. with:
  28. github-token: ${{ secrets.GITHUB_TOKEN }}
  29. - name: Telegram Failure Notification
  30. uses: appleboy/telegram-action@0.0.7
  31. if: failure()
  32. with:
  33. message: ❗ Build failed for [${{ github.repository }}](https://github.com/${{ github.repository }}/actions) because of ${{ github.actor }}
  34. format: markdown
  35. to: ${{ secrets.TELEGRAM_CHAT_ID }}
  36. token: ${{ secrets.TELEGRAM_BOT_TOKEN }}