Skip to content

Commit f6a014e

Browse files
add lint to pull request
1 parent 04f796f commit f6a014e

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

.github/workflows/pull_request.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
on: pull_request
22
name: Pull Request
3-
defaults:
4-
run:
5-
shell: powershell
63
jobs:
4+
lint:
5+
runs-on: ubuntu-latest
6+
timeout-minutes: 5
7+
strategy:
8+
fail-fast: true
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-go@v5
12+
with:
13+
go-version: ">=1.22.0"
14+
- name: gofmt
15+
working-directory: ./Companion
16+
run: |
17+
if [ "$(gofmt -l . | wc -l)" -gt 0 ]; then
18+
exit 1
19+
fi
720
test:
21+
defaults:
22+
run:
23+
shell: powershell
824
name: test
925
runs-on: windows-latest
1026
steps:
@@ -34,4 +50,4 @@ jobs:
3450
3551
- name: Test README generation
3652
run: |
37-
make readme
53+
make readme

0 commit comments

Comments
 (0)