From 232b8c4335609b35f28bb69af8b07a473ca9b9da Mon Sep 17 00:00:00 2001 From: Robert Lillack Date: Tue, 27 Aug 2024 11:00:57 +0200 Subject: [PATCH] build: Try out GitHub Actions --- .github/workflows/build-and-test.yml | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/build-and-test.yml diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000..e4b912a --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,31 @@ +name: Build & Test + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + + build: + runs-on: ubuntu-latest + strategy: + matrix: + go-version: [ '1.20', '1.11', '1.22', '1.23.x' ] + steps: + - uses: actions/checkout@v4 + + - name: Setup Go ${{ matrix.go-version }} + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... + + - name: Code coverage analysis + run: go run github.com/mattn/goveralls@v0.0.11