add gitea workflow for quality
This commit is contained in:
31
.gitea/workflows/quality.yml
Normal file
31
.gitea/workflows/quality.yml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
name: Quality
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Test with Coverage
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: '1.25'
|
||||||
|
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
go mod download
|
||||||
|
|
||||||
|
- name: Run Unit tests
|
||||||
|
run: |
|
||||||
|
go test -race -covermode atomic -coverprofile=coverage.out ./...
|
||||||
|
|
||||||
|
- name: Install goveralls
|
||||||
|
run: go install github.com/mattn/goveralls@v0.0.12
|
||||||
|
|
||||||
|
- name: Send coverage
|
||||||
|
env:
|
||||||
|
COVERALLS_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN}}
|
||||||
|
run: goveralls -coverprofile=coverage.out -service=github
|
||||||
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
image: golang:latest
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- test
|
|
||||||
|
|
||||||
format:
|
|
||||||
stage: test
|
|
||||||
script:
|
|
||||||
- go fmt gitlab.com/naterciom/gubgub
|
|
||||||
- go vet gitlab.com/naterciom/gubgub
|
|
||||||
- go test -race -cover gitlab.com/naterciom/gubgub
|
|
||||||
coverage: '/coverage: \d+.\d+% of statements/'
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user