add codecov workflow and fix ai report for commits

This commit is contained in:
Lifailon
2026-10-26 09:59:44 +03:00
parent f11ee61d75
commit beb4e2f46e
2 changed files with 39 additions and 1 deletions
+3 -1
View File
@@ -48,12 +48,14 @@ jobs:
💬 **Message**: ${{ github.event.head_commit.message }}
- name: Install GitHub Copilot CLI
run: npm install -g @github/copilot
- name: Generate report using AI
id: ai_query
uses: actions/ai-inference@v3
with:
model: gpt-4.1
max-tokens: 2048
system-prompt: |
You are a technical writer (commit reviewer) in Russian.
Analyze the provided git diff of the latest commit.
+36
View File
@@ -0,0 +1,36 @@
name: Go codecov
on:
workflow_dispatch:
# push:
# branches: [main]
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v7
- name: Install Go
uses: actions/setup-go@v7
with:
go-version: 1.25
- name: Run tests with coverage
run: go test ./... -coverprofile=coverage.out -json > test.json
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.out
fail_ci_if_error: false
verbose: true
- name: Publish unit test report using tparse to GitHub Summary
if: always()
run: |
go install github.com/mfridman/tparse@latest
tparse -all -format=markdown -file test.json >> $GITHUB_STEP_SUMMARY