From beb4e2f46e7ddb4d910134f043fa089cd0c58c5f Mon Sep 17 00:00:00 2001 From: Lifailon <116945542+Lifailon@users.noreply.github.com> Date: Mon, 26 Oct 2026 09:59:44 +0300 Subject: [PATCH] add codecov workflow and fix ai report for commits --- .github/workflows/ai-commit-review.yml | 4 ++- .github/workflows/go-codecov.yml | 36 ++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/go-codecov.yml diff --git a/.github/workflows/ai-commit-review.yml b/.github/workflows/ai-commit-review.yml index ab733b6..6947d5e 100644 --- a/.github/workflows/ai-commit-review.yml +++ b/.github/workflows/ai-commit-review.yml @@ -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. diff --git a/.github/workflows/go-codecov.yml b/.github/workflows/go-codecov.yml new file mode 100644 index 0000000..5d5941a --- /dev/null +++ b/.github/workflows/go-codecov.yml @@ -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 \ No newline at end of file