forked from baron/baron-sso
Actions 백엔드 테스트 커버리지 워크플로우 추가
This commit is contained in:
7
.gitea/coverage.json
Normal file
7
.gitea/coverage.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"Path": "./backend/coverage.out",
|
||||
"Thresholds": {
|
||||
"baron-sso-backend/internal/handler": 90,
|
||||
"baron-sso-backend/internal/service": 90
|
||||
}
|
||||
}
|
||||
29
.gitea/workflows/backend_coverage_check.yml
Normal file
29
.gitea/workflows/backend_coverage_check.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Backend Test Coverage Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
coverage:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25"
|
||||
cache-dependency-path: backend/go.sum
|
||||
|
||||
- name: Run tests with coverage
|
||||
working-directory: ./backend
|
||||
run: |
|
||||
go test -v -coverprofile=coverage.out -covermode=atomic ./internal/handler/... ./internal/service/...
|
||||
|
||||
- name: Check coverage
|
||||
uses: vladopajic/go-test-coverage@v2
|
||||
with:
|
||||
config: ./.gitea/coverage.json
|
||||
Reference in New Issue
Block a user