Mohammed Naser | cd45be9 | 2022-08-29 15:07:17 -0400 | [diff] [blame] | 1 | name: lint |
| 2 | on: |
| 3 | pull_request: |
Mohammed Naser | cd45be9 | 2022-08-29 15:07:17 -0400 | [diff] [blame] | 4 | |
| 5 | jobs: |
Mohammed Naser | 7eadd24 | 2022-09-01 18:53:16 -0400 | [diff] [blame] | 6 | images: |
| 7 | runs-on: ubuntu-latest |
| 8 | steps: |
| 9 | - name: Checkout |
Mohammed Naser | 88cb276 | 2023-01-18 03:28:21 +0000 | [diff] [blame] | 10 | uses: actions/checkout@v3 |
Mohammed Naser | 7eadd24 | 2022-09-01 18:53:16 -0400 | [diff] [blame] | 11 | |
| 12 | - name: Set up Go |
Mohammed Naser | 88cb276 | 2023-01-18 03:28:21 +0000 | [diff] [blame] | 13 | uses: actions/setup-go@v3 |
Mohammed Naser | 7eadd24 | 2022-09-01 18:53:16 -0400 | [diff] [blame] | 14 | with: |
| 15 | go-version-file: go.mod |
| 16 | cache: true |
| 17 | |
| 18 | - name: Set up gotestfmt |
| 19 | uses: haveyoudebuggedit/gotestfmt-action@v2 |
Mohammed Naser | 8aad7f0 | 2022-09-01 18:55:44 -0400 | [diff] [blame] | 20 | |
| 21 | - name: Run tests |
| 22 | run: | |
Mohammed Naser | 7eadd24 | 2022-09-01 18:53:16 -0400 | [diff] [blame] | 23 | set -euo pipefail |
| 24 | go test -json -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt |
| 25 | |
| 26 | - name: Upload test log |
dependabot[bot] | e24a006 | 2022-09-02 03:39:33 +0000 | [diff] [blame] | 27 | uses: actions/upload-artifact@v3 |
Mohammed Naser | 7eadd24 | 2022-09-01 18:53:16 -0400 | [diff] [blame] | 28 | if: always() |
| 29 | with: |
| 30 | name: test-log |
| 31 | path: /tmp/gotest.log |
| 32 | if-no-files-found: error |