From 503bafea7cc809f5c809ef76f28af9dab9d12b31 Mon Sep 17 00:00:00 2001 From: Florian Lehner Date: Sat, 6 Apr 2024 09:28:01 +0200 Subject: [PATCH] add CI tests Signed-off-by: Florian Lehner --- .github/workflows/go.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..6b8bf0b --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,33 @@ +on: + push: + branches: [ main ] + pull_request: + branches: [ '**' ] + +# Set default permissions as read only. +permissions: read-all + +name: Go +jobs: + code-check: + strategy: + matrix: + go-version: [1.21.x, 1.22.x] + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Install Go + uses: actions/setup-go@v4 + with: + go-version: ${{ matrix.go-version }} + - name: Download Go dependencies + env: + GOPROXY: "https://proxy.golang.org" + run: go mod download + - name: staticcheck.io + uses: dominikh/staticcheck-action@v1.3.0 + with: + version: "2023.1.7" + install-go: false + cache-key: ${{ matrix.go }}