ci: enhance CI Workflow and Update Ignore Rules

- Add a new 'testing' job to the Gitea workflow with steps for checkout, setup Go, caching, building, and testing
- Include 'bin' directory in the .gitignore file

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2024-02-20 09:54:17 +08:00
parent f171daa81a
commit 058d36bc64
No known key found for this signature in database
2 changed files with 33 additions and 0 deletions

View File

@ -38,3 +38,35 @@ jobs:
with:
version: v1.56.2
args: --timeout 5m
testing:
name: check and test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # all history for all branches and tags
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- uses: https://gitea.com/actions/go-hashfiles@v0.0.1
id: hash-go
with:
patterns: |
go.mod
go.sum
- name: cache go
id: cache-go
uses: actions/cache@v4
with:
path: |
/go_path
/go_cache
key: go_path-${{ steps.hash-go.outputs.hash }}
- name: build
run: make build
- name: test
run: make test

1
.gitignore vendored
View File

@ -21,3 +21,4 @@
# Go workspace file
go.work
release
bin