feat: add CI pipeline
All checks were successful
CI / check and test (push) Successful in 18m35s
CI / check and test (pull_request) Successful in 18m36s

This commit is contained in:
2024-04-01 11:52:01 +02:00
parent 99361a5ccd
commit b72b89db03

41
.gitea/workflows/ci.yaml Normal file
View File

@@ -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