| 1 |
name: Test |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- master |
| 7 |
- v* |
| 8 |
paths: |
| 9 |
- "**/*.go" |
| 10 |
- "go.mod" |
| 11 |
- "go.sum" |
| 12 |
pull_request: |
| 13 |
types: [opened, synchronize, reopened] |
| 14 |
paths: |
| 15 |
- "**/*.go" |
| 16 |
- "go.mod" |
| 17 |
- "go.sum" |
| 18 |
|
| 19 |
jobs: |
| 20 |
test: |
| 21 |
if: github.repository != 'v2ray/v2ray-core' |
| 22 |
runs-on: ${{ matrix.os }} |
| 23 |
strategy: |
| 24 |
fail-fast: false |
| 25 |
matrix: |
| 26 |
os: [windows-latest, ubuntu-latest, macos-latest] |
| 27 |
steps: |
| 28 |
- name: Set up Go 1.x |
| 29 |
uses: actions/setup-go@v2 |
| 30 |
with: |
| 31 |
go-version: ^1.15 |
| 32 |
|
| 33 |
- name: Checkout codebase |
| 34 |
uses: actions/checkout@v2 |
| 35 |
|
| 36 |
- name: Test |
| 37 |
run: go test -v -race -timeout 1h ./... |