@@ -75,22 +75,12 @@ jobs:
7575 - name : Checkout code
7676 uses : actions/checkout@v6
7777
78- - name : Checkout Poster library
79- uses : actions/checkout@v6
80- with :
81- repository : adcondev/poster
82- path : poster
83-
8478 - name : Setup Go
8579 uses : actions/setup-go@v6
8680 with :
8781 go-version : ${{ env.GO_VERSION }}
8882 cache : true
8983
90- - name : Patch Go modules for CI
91- run : |
92- go mod edit -replace github.com/adcondev/poster=./poster
93-
9484 - name : Run tests with race detection
9585 run : go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
9686
@@ -126,12 +116,6 @@ jobs:
126116 with :
127117 fetch-depth : 0
128118
129- - name : Checkout Poster library
130- uses : actions/checkout@v6
131- with :
132- repository : adcondev/poster
133- path : poster
134-
135119 - name : Setup Go
136120 uses : actions/setup-go@v6
137121 with :
@@ -141,20 +125,12 @@ jobs:
141125 - name : Run benchmarks (base)
142126 continue-on-error : true
143127 run : |
144- # Ignore our cloned repos so git clean doesn't delete them
145- git clean -fdx -e poster/
146- git reset --hard
147128 git checkout ${{ github.event.pull_request.base.sha }}
148- # Re-apply the patch because checkout restores the base go.mod
149- go mod edit -replace github.com/adcondev/poster=./poster
150129 go test -bench=. -benchmem -run=^$ ./... > /tmp/base-benchmark.txt 2>&1 || true
151130
152131 - name : Run benchmarks (current)
153132 run : |
154- git clean -fdx -e poster/
155- git reset --hard
156133 git checkout ${{ github.event.pull_request.head.sha }}
157- go mod edit -replace github.com/adcondev/poster=./poster
158134 go test -bench=. -benchmem -run=^$ ./... > /tmp/current-benchmark.txt 2>&1
159135
160136 - name : Compare benchmarks
@@ -229,22 +205,12 @@ jobs:
229205 - name : Checkout code
230206 uses : actions/checkout@v6
231207
232- - name : Checkout Poster library
233- uses : actions/checkout@v6
234- with :
235- repository : adcondev/poster
236- path : poster
237-
238208 - name : Setup Go
239209 uses : actions/setup-go@v6
240210 with :
241211 go-version : ${{ env.GO_VERSION }}
242212 cache : true
243213
244- - name : Patch Go modules for CI
245- run : |
246- go mod edit -replace github.com/adcondev/poster=./poster
247-
248214 - name : Run golangci-lint
249215 uses : golangci/golangci-lint-action@v9
250216 with :
@@ -260,22 +226,12 @@ jobs:
260226 - name : Checkout code
261227 uses : actions/checkout@v6
262228
263- - name : Checkout Poster library
264- uses : actions/checkout@v6
265- with :
266- repository : adcondev/poster
267- path : poster
268-
269229 - name : Setup Go
270230 uses : actions/setup-go@v6
271231 with :
272232 go-version : ${{ env.GO_VERSION }}
273233 cache : true
274234
275- - name : Patch Go modules for CI
276- run : |
277- go mod edit -replace github.com/adcondev/poster=./poster
278-
279235 - name : Install Task
280236 uses : arduino/setup-task@v2
281237 with :
0 commit comments