Files
cc-connect/.github/workflows/ci.yml
T
chenhg5andClaude 34e96c0478 ci: add GitHub workflows for issue handling and update Go setup
Add new workflows:
- issue-reply.yml: Automatically greet new issue creators
- stale.yml: Handle stale issues and PRs with automated warnings/closures
Update ci.yml to use go-version-file instead of hardcoded Go version

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-13 09:43:59 +08:00

41 lines
837 B
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Download dependencies
run: go mod download
- name: Build
run: go build ./...
- name: Run tests
run: go test ./... -v -race
- name: Run tests with coverage
run: go test ./... -coverprofile=coverage.out -covermode=atomic
- name: Upload coverage to Codecov (optional)
uses: codecov/codecov-action@v4
if: github.event_name == 'push'
with:
files: ./coverage.out
fail_ci_if_error: false