forked from v2ray/v2ray-core
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 893 Bytes
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Test
on:
push:
branches: [master]
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
pull_request:
branches: [master]
types: [opened, synchronize, reopened]
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
jobs:
test:
if: github.repository != 'v2ray/v2ray-core'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.15
- name: Checkout codebase
uses: actions/checkout@v2
- name: Cache go module
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: Test
run: go test -timeout 1h -v ./...