From 2cb0943bfc6acc75c3cde5de45398badea4bcd39 Mon Sep 17 00:00:00 2001 From: Kiro Agent <244629292+kiro-agent@users.noreply.github.com> Date: Sat, 2 May 2026 17:21:23 +0000 Subject: [PATCH] Migrate CI from CircleCI to GitHub Actions - Add .github/workflows/ci.yml with lint and test jobs - Remove .circleci/config.yml The GitHub Actions workflow replicates the CircleCI pipeline: - golangci-lint job using the official golangci-lint-action - Build & test job on ubuntu-latest (Docker available for dockertest) - Coverage upload via codecov-action v4 Co-authored-by: Aaron Longwell <27492+adlio@users.noreply.github.com> --- .circleci/config.yml | 45 ------------------------------------ .github/workflows/ci.yml | 50 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 45 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/ci.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index b9c7c4d..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,45 +0,0 @@ -# Golang CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-go/ for more details -version: 2 -jobs: - golangci-lint: - docker: - - image: circleci/golang:latest - steps: - - checkout - - run: - # https://golangci-lint.run/usage/install/ - name: Install golangci-lint - # Note: It's likely the below URL's "master" will change to "main" someday. - # The version of golangci-lint being used can be changed with the vN.N.N at the end of this URL. - command: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ~/bin v1.42.0 - - - run: - name: Run Go Linters - command: ~/bin/golangci-lint run . --timeout 2m - - go-build-and-test: - machine: - image: ubuntu-2004:202107-02 - steps: - - checkout - - run: - name: Fetch Dependencies - command: go get -t . - - run: - name: Execute Go Build - command: go build . - - run: - name: Execute Go Tests - command: go test -race -coverprofile=coverage.txt -covermode=atomic - - run: - name: Upload Code Coverage - command: bash <(curl -s https://codecov.io/bash) - -workflows: - version: 2 - build: - jobs: - - golangci-lint - - go-build-and-test diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..5ee2260 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +name: CI + +on: + push: + branches: [master, main] + pull_request: + branches: [master, main] + +jobs: + golangci-lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + version: v1.42.0 + args: --timeout 2m + + go-build-and-test: + name: Build & Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + + - name: Fetch Dependencies + run: go get -t . + + - name: Build + run: go build . + + - name: Test + run: go test -race -coverprofile=coverage.txt -covermode=atomic + + - name: Upload Coverage to Codecov + uses: codecov/codecov-action@v4 + with: + files: coverage.txt + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}