blob: dcbff92286074ffafb18f84ff32e6f98a1bfcec2 [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:
6 ansible-lint:
7 runs-on: ubuntu-latest
Mohammed Nasere8795362022-08-31 17:52:58 -04008 container: haxorof/ansible-lint:v6
Mohammed Nasercd45be92022-08-29 15:07:17 -04009 steps:
10 - uses: actions/checkout@v3.0.2
Mohammed Nasere8795362022-08-31 17:52:58 -040011 - run: ansible-lint roles
12 env:
13 GITHUB_ACTIONS: true
14 GITHUB_WORKFLOW: "{{ github.workflow.name }}"
Mohammed Naser7eadd242022-09-01 18:53:16 -040015
16 images:
17 runs-on: ubuntu-latest
18 steps:
19 - name: Checkout
20 uses: actions/checkout@v3.0.2
21
22 - name: Set up Go
23 uses: actions/setup-go@v3.3.0
24 with:
25 go-version-file: go.mod
26 cache: true
27
28 - name: Set up gotestfmt
29 uses: haveyoudebuggedit/gotestfmt-action@v2
30 - run: |
31 set -euo pipefail
32 go test -json -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
33
34 - name: Upload test log
35 uses: actions/upload-artifact@v2
36 if: always()
37 with:
38 name: test-log
39 path: /tmp/gotest.log
40 if-no-files-found: error