v2fly/.github/workflows/test.yml

50 lines
1.0 KiB
YAML

name: Test
on:
push:
branches:
- master
- v*
- dev-*
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
- ".github/workflows/test.yml"
pull_request:
types: [opened, synchronize, reopened]
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
- ".github/workflows/test.yml"
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.17
- name: Checkout codebase
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Test
run: |
export PATH=$(go env GOPATH)/bin:${PATH}
go install -v github.com/ory/go-acc@latest
go-acc --covermode=atomic -o=coverage.txt ./...
shell: bash
- name: Upload codecov
run: bash <(curl -s https://codecov.io/bash)
shell: bash