1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 18:17:52 -05:00
v2fly/.github/workflows/coverage.yml
2020-08-31 17:54:49 +08:00

43 lines
936 B
YAML

name: Coverage
on:
push:
branches: [master]
paths:
- "**/*.go"
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.14
- name: Checkout codebase
uses: actions/checkout@v2
- name: Cache go module
uses: actions/cache@v2
id: cache-gomodules
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get dependencies
if: steps.cache-gomodules.outputs.cache-hit != 'true'
run: |
go get -v -t -d ./...
- name: Run coverage
run: ./testing/coverage/coverall2
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.txt
fail_ci_if_error: true