github.com/Uhtred009/v2ray-core-1@v4.31.2+incompatible/.github/workflows/test.yml (about)

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