Skip to content

Commit 862395e

Browse files
committed
ci: fix ci build error
1 parent cf9efe1 commit 862395e

1 file changed

Lines changed: 47 additions & 49 deletions

File tree

.github/workflows/go.yml

Lines changed: 47 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@ name: Unit-Tests
22
on:
33
pull_request:
44
paths:
5-
- 'go.mod'
6-
- '**.go'
7-
- '**.yml'
5+
- "go.mod"
6+
- "**.go"
7+
- "**.yml"
88
push:
99
branches: # Only trigger branch pushes; tag pushes are ignored.
10-
- '**'
10+
- "**"
1111
paths:
12-
- '**.go'
13-
- 'go.mod'
14-
- '**.yml'
12+
- "**.go"
13+
- "go.mod"
14+
- "**.yml"
1515

1616
# https://github.com/actions
1717
jobs:
18-
1918
test:
2019
name: Test on go ${{ matrix.go_version }}
2120
runs-on: ubuntu-latest
@@ -24,50 +23,49 @@ jobs:
2423
go_version: [1.22, 1.23, 1.24, stable]
2524

2625
steps:
27-
- name: Check out code
28-
uses: actions/checkout@v7
29-
with:
30-
fetch-depth: 0
31-
32-
- run: git fetch --force --tags
26+
- name: Check out code
27+
uses: actions/checkout@v7
28+
with:
29+
fetch-depth: 0
3330

34-
- name: Display Env
35-
run: |
36-
git remote -v
37-
git tag -l
38-
env
31+
- run: git fetch --force --tags
3932

40-
- name: Setup Go Faster
41-
uses: WillAbides/setup-go-faster@v1.19.0
42-
timeout-minutes: 3
43-
with:
44-
go-version: ${{ matrix.go_version }}
33+
- name: Display Env
34+
run: |
35+
git remote -v
36+
git tag -l
37+
env
4538
46-
- name: Revive check
47-
uses: docker://morphy/revive-action:v2
48-
with:
49-
# Exclude patterns, separated by semicolons (optional)
50-
exclude: "./internal/..."
39+
- name: Setup Go Faster
40+
uses: WillAbides/setup-go-faster@v1.19.0
41+
timeout-minutes: 3
42+
with:
43+
go-version: ${{ matrix.go_version }}
5144

52-
- name: Run static check
53-
uses: reviewdog/action-staticcheck@v1
54-
if: ${{ github.event_name == 'pull_request'}}
55-
with:
56-
github_token: ${{ secrets.github_token }}
57-
# Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review].
58-
reporter: github-pr-check
59-
# Report all results. [added,diff_context,file,nofilter].
60-
filter_mode: added
61-
# Exit with 1 when it find at least one finding.
62-
fail_on_error: true
45+
- name: Revive check
46+
uses: docker://morphy/revive-action:v2
47+
with:
48+
# Exclude patterns, separated by semicolons (optional)
49+
exclude: "./internal/..."
6350

64-
- name: Run tests
65-
run: |
66-
go test -cover ./...
67-
# go run ./cmd/chlog last head
51+
- name: Run static check
52+
uses: reviewdog/action-staticcheck@v1
53+
if: ${{ github.event_name == 'pull_request'}}
54+
with:
55+
github_token: ${{ secrets.github_token }}
56+
# Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review].
57+
reporter: github-pr-check
58+
# Report all results. [added,diff_context,file,nofilter].
59+
filter_mode: added
60+
# Exit with 1 when it find at least one finding.
61+
fail_on_error: true
6862

69-
- name: Build and run chlog
70-
if: ${{ matrix.go_version == 'stable' }}
71-
run: |
72-
cd cmd/chlog && go install .
73-
chlog --help
63+
- name: Run tests
64+
run: |
65+
go test -cover ./...
66+
# go run ./cmd/chlog last head
67+
- name: Build and run chlog
68+
if: ${{ matrix.go_version == 'stable' }}
69+
run: |
70+
cd cmd/chlog && go mode tidy && go install .
71+
chlog --help

0 commit comments

Comments
 (0)