From 585c5307f00730177466ab733c4950ade60a294d Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 06:01:13 +0000 Subject: [PATCH 1/2] Add GitHub Actions CI workflow - Add comprehensive CI workflow with build, lint, and test jobs - Use Go 1.23.0 as specified in go.mod - Leverage existing Makefile targets (make check, make build-all) - Include cross-platform builds for Linux, macOS, and Windows - Add test coverage reporting and artifact uploads - Include security scanning with gosec (continue-on-error) - Cache Go modules for faster builds Co-Authored-By: Alec Fong --- .github/workflows/ci.yml | 85 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 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 00000000..3b8afb78 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,85 @@ +name: CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + name: Test and Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.23.0' + + - name: Cache Go modules + uses: actions/cache@v3 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Install dependencies + run: make deps + + - name: Run checks (lint, vet, fmt-check, test) + run: make check + + - name: Run security scan + run: make security + continue-on-error: true + + - name: Run tests with coverage + run: make test-coverage + + - name: Upload coverage reports + uses: actions/upload-artifact@v3 + with: + name: coverage-report + path: coverage/ + + build: + name: Cross-platform Build + runs-on: ubuntu-latest + needs: test + strategy: + matrix: + target: [linux, darwin, windows] + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.23.0' + + - name: Cache Go modules + uses: actions/cache@v3 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Install dependencies + run: make deps + + - name: Build for ${{ matrix.target }} + run: make build-${{ matrix.target }} + + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: build-${{ matrix.target }} + path: build/ From f4f9f82d1de110eaeeff921076e765c51ec2a314 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 06:02:39 +0000 Subject: [PATCH 2/2] Fix deprecated GitHub Actions versions - Update actions/cache from v3 to v4 - Update actions/upload-artifact from v3 to v4 - Resolves CI failure due to deprecated action versions Co-Authored-By: Alec Fong --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b8afb78..d8e7afd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: go-version: '1.23.0' - name: Cache Go modules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cache/go-build @@ -42,7 +42,7 @@ jobs: run: make test-coverage - name: Upload coverage reports - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-report path: coverage/ @@ -63,7 +63,7 @@ jobs: go-version: '1.23.0' - name: Cache Go modules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cache/go-build @@ -79,7 +79,7 @@ jobs: run: make build-${{ matrix.target }} - name: Upload build artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: build-${{ matrix.target }} path: build/