pr_push_checks.yaml 822 B

12345678910111213141516171819202122232425262728293031
  1. name: PR Checks
  2. on:
  3. - pull_request
  4. jobs:
  5. testing_matrix:
  6. strategy:
  7. matrix:
  8. os: [ubuntu-latest]
  9. folder: [cli, api, cmd, internal, provisioner]
  10. name: Running Go Tests
  11. runs-on: ${{ matrix.os }}
  12. steps:
  13. - uses: actions/checkout@v3
  14. - name: Setup Go Cache
  15. uses: actions/cache@v3
  16. with:
  17. path: |
  18. ~/.cache/go-build
  19. ~/go/pkg/mod
  20. key: porter-go-${{ hashFiles('**/go.sum') }}
  21. - name: Download Go Modules
  22. run: go mod download
  23. - uses: actions/setup-go@v4
  24. with:
  25. go-version-file: go.mod
  26. cache: false
  27. go-version: '1.20.5'
  28. - name: Run Go vet
  29. run: go vet ./${{ matrix.folder }}/...
  30. - name: Run Go tests
  31. run: go test ./${{ matrix.folder }}/...