mirror of
https://github.com/Lifailon/lazyjournal.git
synced 2026-11-11 01:09:46 +01:00
add codecov workflow and fix ai report for commits
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user