mirror of
https://github.com/KaySar12/NextZen-UserService.git
synced 2025-06-26 13:40:58 +07:00
enable code coverage (#30)
This commit is contained in:
parent
13b6091c79
commit
4fc80b5a1e
24
.github/workflows/codecov.yml
vendored
Normal file
24
.github/workflows/codecov.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
name: Collect Code Coverage
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Go Generate
|
||||||
|
run: go generate
|
||||||
|
- name: Run coverage
|
||||||
|
run: go test -race -failfast -coverprofile=coverage.txt -covermode=atomic -v ./...
|
||||||
|
- name: Upload coverage to Codecov
|
||||||
|
uses: codecov/codecov-action@v3
|
@ -6,7 +6,7 @@ before:
|
|||||||
- go generate
|
- go generate
|
||||||
- go run github.com/google/go-licenses@latest check . --disallowed_types=restricted
|
- go run github.com/google/go-licenses@latest check . --disallowed_types=restricted
|
||||||
- go mod tidy
|
- go mod tidy
|
||||||
- go test -v ./...
|
- go test -race -v ./...
|
||||||
builds:
|
builds:
|
||||||
- id: casaos-user-service-amd64
|
- id: casaos-user-service-amd64
|
||||||
binary: build/sysroot/usr/bin/casaos-user-service
|
binary: build/sysroot/usr/bin/casaos-user-service
|
||||||
|
@ -6,7 +6,7 @@ before:
|
|||||||
- go generate
|
- go generate
|
||||||
- go run github.com/google/go-licenses@latest check . --disallowed_types=restricted
|
- go run github.com/google/go-licenses@latest check . --disallowed_types=restricted
|
||||||
- go mod tidy
|
- go mod tidy
|
||||||
- go test -v ./...
|
- go test -race -v ./...
|
||||||
builds:
|
builds:
|
||||||
- id: casaos-user-service-amd64
|
- id: casaos-user-service-amd64
|
||||||
binary: build/sysroot/usr/bin/casaos-user-service
|
binary: build/sysroot/usr/bin/casaos-user-service
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# CasaOS-UserService
|
# CasaOS-UserService
|
||||||
|
|
||||||
[](https://pkg.go.dev/github.com/IceWhaleTech/CasaOS-UserService) [](https://goreportcard.com/report/github.com/IceWhaleTech/CasaOS-UserService) [](https://github.com/IceWhaleTech/CasaOS-UserService/actions/workflows/release.yml)
|
[](https://pkg.go.dev/github.com/IceWhaleTech/CasaOS-UserService) [](https://goreportcard.com/report/github.com/IceWhaleTech/CasaOS-UserService) [](https://github.com/IceWhaleTech/CasaOS-UserService/actions/workflows/release.yml) [](https://codecov.io/gh/IceWhaleTech/CasaOS-UserService)
|
||||||
|
|
||||||
User Service provides user management functionalities to CasaOS.
|
User Service provides user management functionalities to CasaOS.
|
||||||
|
Loading…
Reference in New Issue
Block a user