Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
92 changes: 0 additions & 92 deletions .github/ISSUE_TEMPLATE/bug_report.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

70 changes: 0 additions & 70 deletions .github/ISSUE_TEMPLATE/feature_request.yml

This file was deleted.

61 changes: 0 additions & 61 deletions .github/pull_request_template.md

This file was deleted.

121 changes: 8 additions & 113 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,122 +5,17 @@ on:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read
security-events: write

jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go: ["1.25"]
steps:
- name: Checkout code
uses: actions/checkout@v7

- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: ${{ matrix.go }}

- name: Cache Go modules
uses: actions/cache@v6
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum', '**/go.mod') }}
restore-keys: |
${{ runner.os }}-go-

- name: Download dependencies
run: go mod download

- name: Verify dependencies
run: go mod verify

- name: Run tests
shell: bash
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...

- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7

- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: "1.25"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: latest
args: --timeout=5m

build:
name: Build
runs-on: ${{ matrix.os }}
needs: [test, lint, security]
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout code
uses: actions/checkout@v7

- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: "1.25"

- name: Build
run: go build -v -o bin/git-context${{ matrix.os == 'windows-latest' && '.exe' || '' }} .

- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: git-context-${{ matrix.os }}
path: bin/git-context${{ matrix.os == 'windows-latest' && '.exe' || '' }}
retention-days: 7

security:
name: Security Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7

- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: "1.25"

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
scan-type: "fs"
scan-ref: "."
format: "sarif"
output: "trivy-results.sarif"
severity: "CRITICAL,HIGH,MEDIUM"
exit-code: "1"

- name: Upload Trivy results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v4.37.4
if: always()
with:
sarif_file: "trivy-results.sarif"
jobs:
ci:
uses: techquestsdev/.github/.github/workflows/go-ci.yml@main
secrets: inherit
13 changes: 13 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Dependency Review

on:
pull_request:
branches: [main]

permissions:
contents: read
pull-requests: write

jobs:
dependency-review:
uses: techquestsdev/.github/.github/workflows/dependency-review.yml@main
18 changes: 18 additions & 0 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Sync Labels

on:
push:
branches: [main]
paths:
- ".github/workflows/labels.yml"
workflow_dispatch:
schedule:
- cron: "0 6 * * 1"

permissions:
contents: read
issues: write

jobs:
labels:
uses: techquestsdev/.github/.github/workflows/sync-labels.yml@main
Loading
Loading