mirror of
https://github.com/rjNemo/go-pass-gen
synced 2026-06-06 02:46:40 +00:00
add github actions
This commit is contained in:
parent
33ab47ea59
commit
1b9576008e
2 changed files with 19 additions and 1 deletions
18
.github/workflows/tests.yaml
vendored
Normal file
18
.github/workflows/tests.yaml
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
name: Test and coverage
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '1.17'
|
||||
- name: Run coverage
|
||||
run: go test -race -coverprofile=coverage.out -covermode=atomic
|
||||
- name: Upload coverage to Codecov
|
||||
run: bash <(curl -s https://codecov.io/bash)
|
||||
2
Makefile
2
Makefile
|
|
@ -19,6 +19,6 @@ web:
|
|||
cd client && npm run start
|
||||
|
||||
test:
|
||||
go test -json -count=1 ./... -coverpkg=./... -coverprofile coverage.txt -covermode=atomic | gotestfmt && go tool cover -html coverage.txt && rm coverage.txt
|
||||
go test -json -count=1 ./... -coverpkg=./... -coverprofile coverage.out -covermode=atomic | gotestfmt && go tool cover -html coverage.outt && rm coverage.outt
|
||||
|
||||
.PHONY: lint run dev run-web test build
|
||||
|
|
|
|||
Loading…
Reference in a new issue