github.com/v2fly/v2ray-core/v5@v5.16.2-0.20240507031116-8191faa6e095/.github/workflows/test.yml (about) 1 name: Test 2 3 on: 4 push: 5 branches: 6 - master 7 - v* 8 - dev-* 9 paths: 10 - "**/*.go" 11 - "go.mod" 12 - "go.sum" 13 - ".github/workflows/test.yml" 14 pull_request: 15 types: [opened, synchronize, reopened] 16 paths: 17 - "**/*.go" 18 - "go.mod" 19 - "go.sum" 20 - ".github/workflows/test.yml" 21 22 jobs: 23 test: 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 1.x 31 uses: actions/setup-go@v4 32 with: 33 go-version: ^1.19 34 35 - name: Checkout codebase 36 uses: actions/checkout@v3 37 with: 38 fetch-depth: 0 39 40 - name: Check Go modules 41 run: | 42 go mod tidy 43 git diff --exit-code go.mod go.sum 44 go mod verify 45 46 - name: Test 47 run: | 48 export PATH=$(go env GOPATH)/bin:${PATH} 49 go install -v github.com/ory/go-acc@latest 50 go-acc --covermode=atomic -o=coverage.txt ./... 51 shell: bash 52 53 - name: Upload codecov 54 run: bash <(curl -s https://codecov.io/bash) 55 shell: bash