mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-27 03:10:08 +08:00
feat #11: release hrp cli binaries automatically with github actions
feat #20: add Makefile for running unittest and building hrp cli binary
This commit is contained in:
40
.github/workflows/unittest.yml
vendored
Normal file
40
.github/workflows/unittest.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: Run unittest with coverage
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
types: [synchronize]
|
||||
schedule:
|
||||
- cron: "0 0 1,11,21 * *"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
go-version:
|
||||
- 1.13.x
|
||||
- 1.14.x
|
||||
- 1.15.x
|
||||
- 1.16.x
|
||||
- 1.17.x
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Run coverage
|
||||
run: go test -race -coverprofile="cover.out" -covermode=atomic ./...
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v2
|
||||
with:
|
||||
name: hrp (HttpRunner+) # User defined upload name. Visible in Codecov UI
|
||||
token: ${{ secrets.CODECOV_TOKEN }} # Repository upload token
|
||||
file: ./cover.out # Path to coverage file to upload
|
||||
flags: unittests # Flag upload to group coverage metrics
|
||||
fail_ci_if_error: true # Specify whether or not CI build should fail if Codecov runs into an error during upload
|
||||
verbose: true
|
||||
Reference in New Issue
Block a user