test.yaml 938 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. name: test
  2. on: [push, pull_request]
  3. jobs:
  4. test:
  5. runs-on: ubuntu-latest
  6. steps:
  7. -
  8. name: Checkout code
  9. uses: actions/checkout@v3
  10. -
  11. name: Install Go
  12. uses: actions/setup-go@v4
  13. with:
  14. go-version: '1.19.x'
  15. -
  16. name: Install node
  17. uses: actions/setup-node@v3
  18. with:
  19. node-version: '18'
  20. cache: 'npm'
  21. cache-dependency-path: './web/package-lock.json'
  22. -
  23. name: Install dependencies
  24. run: make build-deps-ubuntu
  25. -
  26. name: Build docs (required for tests)
  27. run: make docs
  28. -
  29. name: Build web app (required for tests)
  30. run: make web
  31. -
  32. name: Run tests, formatting, vetting and linting
  33. run: make check
  34. -
  35. name: Run coverage
  36. run: make coverage
  37. -
  38. name: Upload coverage to codecov.io
  39. run: make coverage-upload