From 058d36bc64c063a0118b43861d12347948c9246f Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Tue, 20 Feb 2024 09:54:17 +0800 Subject: [PATCH] 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 --- .gitea/workflows/testing.yml | 32 ++++++++++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 33 insertions(+) diff --git a/.gitea/workflows/testing.yml b/.gitea/workflows/testing.yml index 2851517..29689a3 100644 --- a/.gitea/workflows/testing.yml +++ b/.gitea/workflows/testing.yml @@ -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 diff --git a/.gitignore b/.gitignore index e969650..743fd4a 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ # Go workspace file go.work release +bin