From ee2ebec8107f29f973f5bc372eed3c1f3465679d Mon Sep 17 00:00:00 2001 From: Erick Kramer Date: Thu, 20 Jun 2024 16:57:13 +0200 Subject: [PATCH] CI: Add github workflow to validate package The provided github action can be used to build and test the package every time a push is made. --- .github/workflows/general.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/general.yml diff --git a/.github/workflows/general.yml b/.github/workflows/general.yml new file mode 100644 index 0000000..6292dc1 --- /dev/null +++ b/.github/workflows/general.yml @@ -0,0 +1,30 @@ +name: Go +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: '1.22.x' + - name: Install dependencies + run: go get . + - name: Build + run: go build -v ./... + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: '1.22.x' + - name: Install dependencies + run: go get . + - name: Test with the Go CLI + run: go test -v ./test