From 16b4473971caa4a257f334a21d7df9803b7cbe19 Mon Sep 17 00:00:00 2001 From: TyostoKarry <114697841+TyostoKarry@users.noreply.github.com> Date: Sun, 8 Mar 2026 20:09:11 +0200 Subject: [PATCH 1/2] add PR verification workflow Adds a GitHub Actions workflow that runs on every pull request targeting main. The workflow runs two jobs in parallel: - lint: runs golangci-lint to catch style and correctness issues - test: runs go test ./... to ensure all tests pass --- .github/workflows/verify-pr.yml | 39 +++++++++++++++++++++++++++++++++ main.go | 3 +++ 2 files changed, 42 insertions(+) create mode 100644 .github/workflows/verify-pr.yml diff --git a/.github/workflows/verify-pr.yml b/.github/workflows/verify-pr.yml new file mode 100644 index 0000000..558af45 --- /dev/null +++ b/.github/workflows/verify-pr.yml @@ -0,0 +1,39 @@ +name: Verify Pull Request + +on: + pull_request: + branches: + - main + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: Set up Go + uses: actions/setup-go@v6 + with: + go-version-file: "go.mod" + + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + version: latest + + test: + name: Run Tests + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: Set up Go + uses: actions/setup-go@v6 + with: + go-version-file: 'go.mod' + + - name: Run tests + run: go test ./... \ No newline at end of file diff --git a/main.go b/main.go index e69de29..38dd16d 100644 --- a/main.go +++ b/main.go @@ -0,0 +1,3 @@ +package main + +func main() {} From b9f1d7fbf31a57e97d79e5ef638ec7a495be7ab8 Mon Sep 17 00:00:00 2001 From: TyostoKarry <114697841+TyostoKarry@users.noreply.github.com> Date: Sun, 8 Mar 2026 20:26:51 +0200 Subject: [PATCH 2/2] Use latest golanci-lint-action versio --- .github/workflows/verify-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verify-pr.yml b/.github/workflows/verify-pr.yml index 558af45..f5d986a 100644 --- a/.github/workflows/verify-pr.yml +++ b/.github/workflows/verify-pr.yml @@ -18,7 +18,7 @@ jobs: go-version-file: "go.mod" - name: Run golangci-lint - uses: golangci/golangci-lint-action@v6 + uses: golangci/golangci-lint-action@v9 with: version: latest