Skip to content

Commit

Permalink
Fix CI test. (#2)
Browse files Browse the repository at this point in the history
* Set up go.

* Fix quotes.

* Fix test.

* Update go versions.
  • Loading branch information
wi1dcard committed Mar 13, 2024
1 parent a22cdda commit b05eecb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: stable
check-latest: true
- run: go get
- name: Run tests
run: |
PKG_LIST=$(go list ./... | grep -v github.com/wi1dcard/fingerproxy/pkg/http2)
echo "```" >> $GITHUB_STEP_SUMMARY
go test -v "$PKG_LIST" >> $GITHUB_STEP_SUMMARY
echo "```" >> $GITHUB_STEP_SUMMARY
go version
echo '```' >> $GITHUB_STEP_SUMMARY
make test >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
build-release:
name: Build and Release
Expand All @@ -33,12 +37,13 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: ~1.21.0
go-version-file: go.mod

- run: |
go version
go get
- run: go get
- run: make build
env:
CGO_ENABLED: 0

- name: Get short sha
id: short-sha
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ build_%:
./cmd

chmod +x $(BINPATH)

PKG_LIST = $(shell go list ./... | grep -v github.com/wi1dcard/fingerproxy/pkg/http2)
test:
@go test -v $(PKG_LIST)

0 comments on commit b05eecb

Please sign in to comment.