-
Notifications
You must be signed in to change notification settings - Fork 73
Create CI/CD test and build in the Github action #523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 14 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
8ed368c
Create test build in github action
lamida fbe7a33
Fix job invalid job name
lamida 28e17a8
Use listen port 8080 due to issue in github action
lamida 859a1bc
Run github action only on push to main
lamida 4abd795
Update check-protos step
lamida c3b8d3e
Use go-version matrix
lamida 32dd7e1
Fix yaml
lamida 43aaf60
Revert accidentally unintended commits
lamida a4f8fc7
Apply PR feedbacks
lamida 1a502eb
Capitalise workflow name
lamida 022cbd8
Can't use template in the job name
lamida e30ff91
Revert to original job id
lamida ff31373
Use better job name description
lamida 86175ff
Fix step name
lamida 14c9835
Remove redundant step name
lamida 4f58f1e
Simplify the step name again
lamida b1af1cf
Update server/server_test.go
lamida 11af660
Use separate job for go test 1.20.x
lamida f242934
Separate job for test and the rest
lamida b00e88f
Update .github/workflows/test-build.yml
lamida 485a1db
Apply more PR feedbacks
lamida File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
concurrency: | ||
# Cancel any running workflow for the same branch when new commits are pushed. | ||
# We group both by ref_name (available when CI is triggered by a push to a branch/tag) | ||
# and head_ref (available when CI is triggered by a PR). | ||
group: "${{ github.ref_name }}-${{ github.head_ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test-build: | ||
name: Build and test on Go ${{ matrix.go-version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
charleskorn marked this conversation as resolved.
Show resolved
Hide resolved
|
||
go-version: ['1.20.x', '1.21.x'] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Go ${{ matrix.go-version }} | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Display Go Version | ||
run: go version | ||
- name: Run Go mod check | ||
run: make mod-check | ||
- name: Run lint | ||
run: make lint | ||
- name: Run test | ||
run: make test | ||
- name: Run test benchmarks | ||
run: make test-benchmarks | ||
- name: Run check protos and generate Go code from the proto files | ||
run: | | ||
apt-get update && apt-get -y install unzip | ||
go mod vendor | ||
make check-protos |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.