set badge with new action

This commit is contained in:
JT2M0L3Y
2026-07-14 17:30:58 -07:00
parent e0888c4d7c
commit c6af5765c8
4 changed files with 21 additions and 13 deletions
+17 -7
View File
@@ -5,14 +5,14 @@ on:
pull_request: pull_request:
branches: branches:
- master - master
push: types: [opened, synchronize, reopened, closed]
branches:
- master permissions:
contents: write
jobs: jobs:
Discord-Node-Coverage: Discord-Node-Coverage:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# environment: coverage
timeout-minutes: 2 timeout-minutes: 2
steps: steps:
@@ -40,7 +40,17 @@ jobs:
run: npm run coverage run: npm run coverage
- name: Upload Coverage to Codecov - name: Upload Coverage to Codecov
uses: codecov/codecov-action@v5 uses: wjervis7/vitest-badge-action@v1
if: success() || failure()
with: with:
files: coverage/lcov.info result-type: statements
fail_ci_if_error: true badge-text: 'Coverage (Statements)'
badge-path: ./imgs/coverage.svg
upload-badge: false
- name: Commit badge with merge
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
uses: stefanzweifel/git-auto-commit-action@v7
with:
file_pattern: ./imgs/coverage.svg
commit_message: 'update with coverage badge'
+1 -1
View File
@@ -12,7 +12,7 @@
# Technical/Business Code Ownership # Technical/Business Code Ownership
/src/ @kevinthedang @JT2M0L3Y /src/ @kevinthedang @JT2M0L3Y
/tests/ @JT2M0L3Y /tests/ @JT2M0L3Y
/.github/ @kevinthedang /.github/ @kevinthedang @JT2M0L3Y
# Docker Ownership # Docker Ownership
Dockerfile @kevinthedang Dockerfile @kevinthedang
+1 -2
View File
@@ -5,9 +5,8 @@
<p><a href="#"></a><a href="https://creativecommons.org/licenses/by/4.0/"><img alt="License" src="https://img.shields.io/badge/License-CC_BY_4.0-darkgreen.svg" /></a> <p><a href="#"></a><a href="https://creativecommons.org/licenses/by/4.0/"><img alt="License" src="https://img.shields.io/badge/License-CC_BY_4.0-darkgreen.svg" /></a>
<a href="#"></a><a href="https://github.com/kevinthedang/discord-ollama/releases/latest"><img alt="Release" src="https://img.shields.io/github/v/release/kevinthedang/discord-ollama?logo=github" /></a> <a href="#"></a><a href="https://github.com/kevinthedang/discord-ollama/releases/latest"><img alt="Release" src="https://img.shields.io/github/v/release/kevinthedang/discord-ollama?logo=github" /></a>
<a href="#"></a><a href="https://github.com/kevinthedang/discord-ollama/actions/workflows/build.yml"><img alt="Builds" src="https://github.com/kevinthedang/discord-ollama/actions/workflows/build.yml/badge.svg" /></a> <a href="#"></a><a href="https://github.com/kevinthedang/discord-ollama/actions/workflows/build.yml"><img alt="Builds" src="https://github.com/kevinthedang/discord-ollama/actions/workflows/build.yml/badge.svg" /></a>
<!-- <a href="#"></a><a href="https://github.com/kevinthedang/discord-ollama/actions/workflows/deploy.yml"><img alt="Deploy Status" src="https://github.com/kevinthedang/discord-ollama/actions/workflows/deploy.yml/badge.svg" /></a> -->
<a href="#"></a><a href="https://github.com/kevinthedang/discord-ollama/actions/workflows/test.yml"><img alt="Tests" src="https://github.com/kevinthedang/discord-ollama/actions/workflows/test.yml/badge.svg" /></a> <a href="#"></a><a href="https://github.com/kevinthedang/discord-ollama/actions/workflows/test.yml"><img alt="Tests" src="https://github.com/kevinthedang/discord-ollama/actions/workflows/test.yml/badge.svg" /></a>
<a href="https://codecov.io/gh/kevinthedang/discord-ollama"><img src="https://img.shields.io/codecov/c/github/kevinthedang/discord-ollama?logo=codecov" alt="coverage" /></a> <a href="#"></a><a href="https://github.com/kevinthedang/discord-ollama/actions/workflows/coverage.yml"><img alt="Coverage" src="https://github.com/kevinthedang/discord-ollama/blob/main/imgs/coverage.svg?raw=true" /></a>
</div> </div>
## About/Goals ## About/Goals
+2 -3
View File
@@ -1,4 +1,4 @@
import { defineConfig, configDefaults } from 'vitest/config' import { defineConfig } from 'vitest/config'
// config for vitest // config for vitest
export default defineConfig({ export default defineConfig({
@@ -7,8 +7,7 @@ export default defineConfig({
reporters: ['verbose'], // <-- verbose output reporters: ['verbose'], // <-- verbose output
coverage: { coverage: {
include: ['src/**/*.ts'], include: ['src/**/*.ts'],
reporter: 'lcov', reporter: 'json-summary'
reportsDirectory: './coverage'
} }
} }
}) })