From c75a76281d29c819016f80885dc6966e581b0941 Mon Sep 17 00:00:00 2001 From: Jaakko Heusala Date: Sun, 24 Aug 2025 19:10:36 +0300 Subject: [PATCH 1/2] Added initial test workflow --- .github/workflows/test.yml | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..e1bed25 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,48 @@ +name: Test + +on: + push: + branches: [ "**" ] + pull_request: + branches: [ "**" ] + +permissions: + contents: read + +concurrency: + group: go-tests-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + go-version: [ "1.22.x" ] # add more versions if you want (e.g., "1.21.x") + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} + cache: true + + - name: Show Go version + run: go version + + - name: Download deps + run: go mod download + + - name: Run tests (race + coverage) + run: go test -race -coverprofile=coverage.out -covermode=atomic ./... + + - name: Upload coverage artifact + if: always() + uses: actions/upload-artifact@v4 + with: + name: coverage-${{ matrix.go-version }} + path: coverage.out + From ca59ab6cbed9cda4872fbc68049a5be937979046 Mon Sep 17 00:00:00 2001 From: Jaakko Heusala Date: Sun, 24 Aug 2025 19:13:58 +0300 Subject: [PATCH 2/2] Update .github/workflows/test.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e1bed25..122394b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,9 +2,9 @@ name: Test on: push: - branches: [ "**" ] + branches: [ "main", "develop" ] pull_request: - branches: [ "**" ] + branches: [ "main", "develop" ] permissions: contents: read