From b72b89db039aaf9833f7bf8382160963f629dd9b Mon Sep 17 00:00:00 2001 From: Timo Behrendt Date: Mon, 1 Apr 2024 11:52:01 +0200 Subject: [PATCH] feat: add CI pipeline --- .gitea/workflows/ci.yaml | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .gitea/workflows/ci.yaml diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml new file mode 100644 index 0000000..351e15e --- /dev/null +++ b/.gitea/workflows/ci.yaml @@ -0,0 +1,41 @@ +name: CI +on: + - push + - pull_request + +env: + GOPATH: /go_path + GOCACHE: /go_cache + +jobs: + 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