github.com/xraypb/Xray-core@v1.8.1/.github/workflows/test.yml (about)

     1  name: Test
     2  
     3  on:
     4    push:
     5      branches:
     6        - main
     7      paths:
     8        - "**/*.go"
     9        - "go.mod"
    10        - "go.sum"
    11        - ".github/workflows/*.yml"
    12    pull_request:
    13      types: [opened, synchronize, reopened]
    14      paths:
    15        - "**/*.go"
    16        - "go.mod"
    17        - "go.sum"
    18        - ".github/workflows/*.yml"
    19  
    20  jobs:
    21    test:
    22      permissions:
    23        contents: read
    24      runs-on: ${{ matrix.os }}
    25      strategy:
    26        fail-fast: false
    27        matrix:
    28          os: [windows-latest, ubuntu-latest, macos-latest]
    29      steps:
    30        - name: Set up Go
    31          uses: actions/setup-go@v4
    32          with:
    33            go-version: '1.20'
    34            check-latest: true
    35        - name: Checkout codebase
    36          uses: actions/checkout@v3
    37        - name: Restore Cache
    38          uses: actions/cache/restore@v3
    39          with:
    40            path: resources
    41            key: xray-geodat-
    42            enableCrossOsArchive: true
    43        - name: Test
    44          run: go test -timeout 1h -v ./...