github.com/EagleQL/Xray-core@v1.4.3/.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      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
    29          uses: actions/setup-go@v2
    30          with:
    31            go-version: ^1.16
    32        - name: Checkout codebase
    33          uses: actions/checkout@v2
    34  
    35        - name: Prepare geo*dat
    36          if: ${{ matrix.os != 'windows-latest' }}
    37          run: |
    38            mkdir resources
    39            wget -O ./resources/geoip.dat https://github.com/v2fly/geoip/releases/latest/download/geoip.dat
    40            wget -O ./resources/geosite.dat https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat
    41        - name: Prepare geo*dat for Windows
    42          if: ${{ matrix.os == 'windows-latest' }}
    43          run: |
    44            mkdir resources
    45            Invoke-WebRequest -Uri "https://github.com/v2fly/geoip/releases/latest/download/geoip.dat" -OutFile "./resources/geoip.dat"
    46            Invoke-WebRequest -Uri "https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat" -OutFile "./resources/geosite.dat"
    47        - name: Test
    48          run: go test -timeout 1h -v ./...