github.com/xtls/xray-core@v1.8.12-0.20240518155711-3168d27b0bdb/.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: Checkout codebase
    31          uses: actions/checkout@v4
    32        - name: Set up Go
    33          uses: actions/setup-go@v5
    34          with:
    35            go-version-file: go.mod
    36            check-latest: true
    37        - name: Restore Cache
    38          uses: actions/cache/restore@v4
    39          with:
    40            path: resources
    41            key: xray-geodat-
    42            enableCrossOsArchive: true
    43        - name: Test
    44          run: go test -timeout 1h -v ./...