From 8f22fe2321a9ca4666e108499c749eeb65aef588 Mon Sep 17 00:00:00 2001 From: Aaron Longwell Date: Sat, 21 Feb 2026 11:40:24 -0800 Subject: [PATCH 1/3] Migrate from CircleCI to GitHub Actions - Add GitHub Actions CI workflow (lint + test with coverage) - Add release workflow for automated GitHub releases on tag push - Update README badges to use GitHub Actions - Add version history entry for 1.4.0 --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++ .github/workflows/release.yml | 47 +++++++++++++++++++++++++++++++++++ README.md | 20 +++++++++++---- 3 files changed, 101 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..94f0f6c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + - name: golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + version: v2.10.1 + + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + + - name: Run tests with coverage + run: go test -race -coverprofile=coverage.out -covermode=atomic ./... + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + files: coverage.out + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5761e0b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,47 @@ +name: Release + +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+*" + +permissions: + contents: write + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Generate release notes + id: notes + run: | + # Get the previous tag + PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "") + + if [ -n "$PREV_TAG" ]; then + echo "Generating changelog from $PREV_TAG to $GITHUB_REF_NAME" + NOTES=$(git log --pretty=format:"- %s" "$PREV_TAG"..HEAD) + else + echo "No previous tag found, using all commits" + NOTES=$(git log --pretty=format:"- %s") + fi + + { + echo "notes<> "$GITHUB_OUTPUT" + + - name: Create GitHub Release + run: | + gh release create "$GITHUB_REF_NAME" \ + --title "$GITHUB_REF_NAME" \ + --notes "${{ steps.notes.outputs.notes }}" \ + --generate-notes + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index e881275..7484f49 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,14 @@ # Schema - Database Migrations for Go +[![Go Reference](https://pkg.go.dev/badge/github.com/adlio/schema.svg)](https://pkg.go.dev/github.com/adlio/schema) +[![CI](https://github.com/adlio/schema/actions/workflows/ci.yml/badge.svg)](https://github.com/adlio/schema/actions/workflows/ci.yml) +[![codecov](https://codecov.io/gh/adlio/schema/graph/badge.svg)](https://codecov.io/gh/adlio/schema) +[![Go Report Card](https://goreportcard.com/badge/github.com/adlio/schema)](https://goreportcard.com/report/github.com/adlio/schema) +[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) + An embeddable library for applying changes to your Go application's `database/sql` schema. -[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=for-the-badge)](https://pkg.go.dev/github.com/adlio/schema) -[![CircleCI Build Status](https://img.shields.io/circleci/build/github/adlio/schema?style=for-the-badge)](https://dl.circleci.com/status-badge/redirect/gh/adlio/schema/tree/main) -[![Go Report Card](https://goreportcard.com/badge/github.com/adlio/schema?style=for-the-badge)](https://goreportcard.com/report/github.com/adlio/schema) -[![Code Coverage](https://img.shields.io/codecov/c/github/adlio/schema?style=for-the-badge)](https://codecov.io/gh/adlio/schema) - ## Features - Cloud-friendly design tolerates embedded use in clusters @@ -178,6 +179,15 @@ there's a good chance a different schema migration tool is more appropriate. ## Version History +### 1.4.0 - Feb 21, 2026 + +- **Breaking:** Go 1.24+ now required (was 1.22) +- **Breaking:** MSSQL driver changed from `denisenkom/go-mssqldb` to `microsoft/go-mssqldb` +- Update all dependencies to latest versions +- Fix data race in MSSQL Unlock function +- Migrate CI from CircleCI to GitHub Actions +- Add automated release workflow + ### 1.3.9 - Jul 21, 2025 - Update Go version requirement to 1.21 to resolve CircleCI build issues with slices package dependency From 885abd98ecc0d5c563b3cafe3b1b5006ff964572 Mon Sep 17 00:00:00 2001 From: Aaron Longwell Date: Sat, 21 Feb 2026 11:44:00 -0800 Subject: [PATCH 2/3] Remove CircleCI configuration --- .circleci/config.yml | 56 -------------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index b7c0334..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,56 +0,0 @@ -# Golang CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-go/ for more details -version: 2.1 -jobs: - golangci-lint: - docker: - - image: cimg/go:1.24 - 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 v2.10.1 - - - run: - name: Run Go Linters - command: ~/bin/golangci-lint run . --timeout 2m - - go-build-and-test: - machine: - image: ubuntu-2204:2023.02.1 - steps: - - checkout - - run: - name: Install Go 1.24 - command: | - sudo rm -rf /usr/local/go - wget https://go.dev/dl/go1.24.0.linux-amd64.tar.gz - sudo tar -C /usr/local -xzf go1.24.0.linux-amd64.tar.gz - echo 'export PATH=/usr/local/go/bin:$PATH' >> ~/.bashrc - source ~/.bashrc - - run: - name: Verify Go Version - command: /usr/local/go/bin/go version - - run: - name: Fetch Dependencies - command: /usr/local/go/bin/go get -t . - - run: - name: Execute Go Build - command: /usr/local/go/bin/go build . - - run: - name: Execute Go Tests - command: /usr/local/go/bin/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 From a3072d50a20e1ae8d69e076d7054c548110f9d09 Mon Sep 17 00:00:00 2001 From: Aaron Longwell Date: Sat, 21 Feb 2026 11:45:17 -0800 Subject: [PATCH 3/3] Fix golangci-lint-action version (v7 required for lint v2) --- .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 94f0f6c..2ce3b1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: with: go-version: "1.24" - name: golangci-lint - uses: golangci/golangci-lint-action@v6 + uses: golangci/golangci-lint-action@v7 with: version: v2.10.1