Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b31de71
Simplify linters config, fix cyclop issues in main.go
grdl Aug 24, 2025
09da7ea
Fix cyclop issues in url.go
grdl Aug 24, 2025
d608fe8
Add unit tests for main.go
grdl Aug 24, 2025
0fb78ce
Disable depguard linter
grdl Aug 24, 2025
59aaaff
Disable paralleltest linter
grdl Aug 24, 2025
0bf2765
Fix issues found by wsl linter
grdl Aug 24, 2025
288a642
Disable wrapcheck linter
grdl Aug 24, 2025
f60cfd1
Fix issues found by varnamelen linter
grdl Aug 24, 2025
46f5aa0
Disable gochecknoglobals linter
grdl Aug 24, 2025
5f60e97
Disable exhaustruct linter
grdl Aug 24, 2025
5996438
Fix issues found by revive linter
grdl Aug 24, 2025
1e1584b
Fix issues found by goerrcheck linter
grdl Aug 24, 2025
f20ab7d
Fix issues found by err113 linter
grdl Aug 24, 2025
88608f9
Disable forbidigo linter
grdl Aug 24, 2025
07a6409
Disable godox linter temporarily
grdl Aug 24, 2025
7bc9cbb
Fix issues found by goconst linter
grdl Aug 24, 2025
eadc2ff
Fix issues found by godot linter
grdl Aug 24, 2025
3a5fac5
Disable testpackage linter temporarily
grdl Aug 24, 2025
c9a5539
Fix issues found by testifylint linter
grdl Aug 24, 2025
d43ea77
Disable unparam linter
grdl Aug 24, 2025
b39f5e6
Fix issues found by thelper linter
grdl Aug 24, 2025
2de1261
Fix smaller issues found by various linters
grdl Aug 24, 2025
0db5ba6
Fix issues found by ineffassign linter
grdl Aug 24, 2025
08f3264
Fix issues found by mirror linter
grdl Aug 24, 2025
8b8c814
Fix issues found by staticcheck linter
grdl Aug 24, 2025
aa1da8e
Refactor package print into out to fix failing predeclared linter
grdl Aug 24, 2025
1bf52c4
Fix issues found by perfsprint linter
grdl Aug 24, 2025
3b85a64
Disable mnd linter
grdl Aug 24, 2025
ca8681f
Fix issues found by nlreturn linter
grdl Aug 24, 2025
046a847
Disable noinlineerr linter and gci formatter
grdl Aug 24, 2025
16e4814
Re-enable linting in CI actions
grdl Aug 24, 2025
42df73c
Set git user and email in tests helper instead of CI jobs. Simplify CI
grdl Aug 24, 2025
1b8c05d
Clean up Github workflows
grdl Aug 24, 2025
f9ff6e0
Re-enable windows tests
grdl Aug 24, 2025
5922fd8
Fix incorrect tests in repo_test
grdl Aug 24, 2025
ea178b2
Add sync mechanism to git operations to avoid race conditions when te…
grdl Aug 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions .github/dependabot.yml

This file was deleted.

99 changes: 12 additions & 87 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [master, main]
pull_request:
branches: [master, main]
workflow_call:

permissions:
contents: read
Expand All @@ -16,9 +17,7 @@ jobs:
strategy:
matrix:
go-version: ['1.24']
os: [ubuntu-latest, macos-latest]
# TODO: fix tests on windows
# os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -38,23 +37,13 @@ jobs:

- name: Verify dependencies
run: go mod verify

- name: Build binary
run: go build -v -o bin/git-get ./cmd/

- name: Run tests
run: go test -race ./...

- name: Set up Git (for tests)
run: |
git config --global user.email "test@example.com"
git config --global user.name "CI Test"

- name: Run tests with coverage
run: go test -race -coverprofile coverage.out -covermode=atomic ./...

- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.24'
uses: codecov/codecov-action@v5
with:
file: ./coverage.out
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false

lint:
name: Lint
Expand All @@ -69,74 +58,10 @@ jobs:
with:
go-version: '1.24'
cache: true

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
# TODO: Fix linting errors
continue-on-error: true
with:
version: latest
args: --timeout=5m

security:
name: Security
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
- name: Run lints
uses: golangci/golangci-lint-action@v8
with:
scan-type: 'fs'
scan-ref: '.'
format: 'sarif'
output: 'trivy-results.sarif'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: 'trivy-results.sarif'
version: v2.4.0
args: --timeout=5m

build:
name: Build
needs: [test, lint, security]
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true

- name: Build binary
run: |
go build -v -o bin/git-get ./cmd/

- name: Test binary and symlink behavior
run: |
./bin/git-get --version
# Test symlink functionality
ln -sf git-get bin/git-list
./bin/git-list --version

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: binary
path: bin/
retention-days: 30
46 changes: 0 additions & 46 deletions .github/workflows/codeql.yml

This file was deleted.

47 changes: 3 additions & 44 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,49 +10,8 @@ permissions:
security-events: write

jobs:
validate:
name: Validate Release
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true

- name: Download dependencies
run: go mod download

- name: Verify dependencies
run: go mod verify

- name: Set up Git (for tests)
run: |
git config --global user.email "test@example.com"
git config --global user.name "CI Test"

- name: Run tests
run: go test -race ./...

- name: Run lints
uses: golangci/golangci-lint-action@v6
# TODO: Fix linting errors
continue-on-error: true
with:
version: latest
args: --timeout=5m

- name: Validate GoReleaser config
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: check
build-and-test:
uses: ./.github/workflows/ci.yml

release:
name: GoReleaser
Expand All @@ -74,7 +33,7 @@ jobs:
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: latest
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ dist/
__debug_bin
.claude/
CLAUDE.md

# Locally built executables
git-get
git-get.exe
Loading
Loading