From bb46b852fd8d4bf23f7e239a8c5f9a880c1ac0a2 Mon Sep 17 00:00:00 2001 From: Frederik Leonhardt Date: Thu, 16 Apr 2026 20:53:07 +1200 Subject: [PATCH] ci: add workflow for linting and testing --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4c5299a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: Lint and Test + +on: + push: + branches: + - main + pull_request: + branches: + - main + +permissions: + contents: read + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + strategy: &strategy + matrix: + go-version: ['1.24'] + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-go@v6 + with: + go-version: ${{ matrix.go-version }} + - name: golangci-lint + uses: golangci/golangci-lint-action@v9 + with: + version: v2.11 + + test: + name: Test + runs-on: ubuntu-latest + strategy: *strategy + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-go@v6 + with: + go-version: ${{ matrix.go-version }} + - name: Run tests + run: go test -v ./... \ No newline at end of file