blob: 1da2eab0e7021236069cfce9e3f3f3495c238263 [file] [log] [blame]
Mohammed Nasercd45be92022-08-29 15:07:17 -04001name: lint
2on:
3 pull_request:
Mohammed Nasercd45be92022-08-29 15:07:17 -04004
5jobs:
Mohammed Naser7eadd242022-09-01 18:53:16 -04006 images:
7 runs-on: ubuntu-latest
8 steps:
9 - name: Checkout
Mohammed Naser88cb2762023-01-18 03:28:21 +000010 uses: actions/checkout@v3
Mohammed Naser7eadd242022-09-01 18:53:16 -040011
12 - name: Set up Go
Mohammed Naser88cb2762023-01-18 03:28:21 +000013 uses: actions/setup-go@v3
Mohammed Naser7eadd242022-09-01 18:53:16 -040014 with:
15 go-version-file: go.mod
16 cache: true
17
18 - name: Set up gotestfmt
19 uses: haveyoudebuggedit/gotestfmt-action@v2
Mohammed Naser8aad7f02022-09-01 18:55:44 -040020
21 - name: Run tests
22 run: |
Mohammed Naser7eadd242022-09-01 18:53:16 -040023 set -euo pipefail
24 go test -json -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
25
26 - name: Upload test log
dependabot[bot]e24a0062022-09-02 03:39:33 +000027 uses: actions/upload-artifact@v3
Mohammed Naser7eadd242022-09-01 18:53:16 -040028 if: always()
29 with:
30 name: test-log
31 path: /tmp/gotest.log
32 if-no-files-found: error