From 914ef53fd872f753bb5ab521b326ba96cf0d09fc Mon Sep 17 00:00:00 2001 From: Serhii Yermakov Date: Sat, 9 May 2026 07:47:00 +0200 Subject: [PATCH 1/2] Add GitHub Actions CI --- .github/workflows/ci.yml | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 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..fca8ca9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +name: ci + +on: + pull_request: + push: + branches: ["main"] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + test: + name: gofmt + test + vet + runs-on: ubuntu-latest + timeout-minutes: 10 + + env: + GOFLAGS: -mod=readonly + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + cache: true + + - name: gofmt check + run: | + bad=$(gofmt -l $(git ls-files '*.go')) + if [ -n "$bad" ]; then + echo "gofmt needed on:" + echo "$bad" + exit 1 + fi + + - name: go test + run: go test ./... -count=1 -race + + - name: go vet + run: go vet ./... \ No newline at end of file From 465a71e698f0098343a5a001ffdf234d5848d053 Mon Sep 17 00:00:00 2001 From: Serhii Yermakov Date: Sat, 9 May 2026 07:47:40 +0200 Subject: [PATCH 2/2] Add GitHub Actions CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fca8ca9..5d52067 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: ci on: pull_request: push: - branches: ["main"] + branches: ["master"] workflow_dispatch: permissions: