mirror of
https://github.com/rjNemo/go-pass-gen
synced 2026-06-06 02:46:40 +00:00
add github actions (#4)
* add github actions * use codecov github actions * remove failing step * verbose * test all folders Co-authored-by: Ruidy <rnemausat@newstore.com>
This commit is contained in:
parent
33ab47ea59
commit
addd67f387
2 changed files with 25 additions and 1 deletions
24
.github/workflows/tests.yaml
vendored
Normal file
24
.github/workflows/tests.yaml
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
name: Test and coverage
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '1.17'
|
||||
- name: Run tests with coverage
|
||||
run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
|
||||
- uses: codecov/codecov-action@v2
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
|
||||
files: ./coverage.out # optional
|
||||
flags: unittests # optional
|
||||
name: codecov-umbrella # optional
|
||||
fail_ci_if_error: true # optional (default = false)
|
||||
verbose: true # optional (default = false)
|
||||
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.out && rm coverage.out
|
||||
|
||||
.PHONY: lint run dev run-web test build
|
||||
|
|
|
|||
Loading…
Reference in a new issue