|
| 1 | +name: Daily Build Status |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: "0 11 * * *" # 11 UTC, everyday |
| 6 | + |
| 7 | +jobs: |
| 8 | + build: |
| 9 | + name: ${{ matrix.os }} ${{ matrix.version }} ${{ matrix.go }} |
| 10 | + runs-on: ${{ matrix.os }} |
| 11 | + |
| 12 | + # Only in the official repository. |
| 13 | + if: github.repository == 'golang/vscode-go' |
| 14 | + timeout-minutes: 20 |
| 15 | + strategy: |
| 16 | + fail-fast: false |
| 17 | + matrix: |
| 18 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 19 | + version: ['stable', 'insiders'] |
| 20 | + go: ['1.15', '1.16'] |
| 21 | + |
| 22 | + steps: |
| 23 | + - name: Clone repository |
| 24 | + uses: actions/checkout@v2 |
| 25 | + |
| 26 | + - name: Setup Node |
| 27 | + uses: actions/setup-node@v1 |
| 28 | + with: |
| 29 | + node-version: '14.x' |
| 30 | + |
| 31 | + - name: Setup Go |
| 32 | + uses: actions/setup-go@v2 |
| 33 | + with: |
| 34 | + go-version: ${{ matrix.go }} |
| 35 | + stable: '!contains(${{ matrix.go }}, "beta") && !contains(${{ matrix.go }}, "rc")' |
| 36 | + |
| 37 | + - name: Install dependencies |
| 38 | + run: npm ci |
| 39 | + |
| 40 | + - name: Compile |
| 41 | + run: npm run vscode:prepublish |
| 42 | + |
| 43 | + - name: Install Go tools (Modules mode) |
| 44 | + run: | |
| 45 | + go version |
| 46 | + go get github.com/acroca/go-symbols |
| 47 | + go get github.com/davidrjenni/reftools/cmd/fillstruct |
| 48 | + go get github.com/haya14busa/goplay/cmd/goplay |
| 49 | + # Install two versions of gocode (one as gocode-gomod) |
| 50 | + go get github.com/stamblerre/gocode |
| 51 | + mv "${HOME}/go/bin/gocode${{env.EXT}}" "${HOME}/go/bin/gocode-gomod${{env.EXT}}" |
| 52 | + go get github.com/mdempsky/gocode |
| 53 | + go get github.com/sqs/goreturns |
| 54 | + go get github.com/uudashr/gopkgs/v2/cmd/gopkgs |
| 55 | + go get github.com/zmb3/gogetdoc |
| 56 | + go get golang.org/x/lint/golint |
| 57 | + go get golang.org/x/tools/cmd/gorename |
| 58 | + go get golang.org/x/tools/gopls |
| 59 | + go get github.com/cweill/gotests/... |
| 60 | + go get github.com/rogpeppe/godef |
| 61 | + go get github.com/ramya-rao-a/go-outline |
| 62 | + go get github.com/go-delve/delve/cmd/dlv@master |
| 63 | + env: |
| 64 | + GO111MODULE: on |
| 65 | + EXT: "${{ matrix.os == 'windows-latest' && '.exe' || ''}}" |
| 66 | + |
| 67 | + - name: Run unit tests |
| 68 | + run: npm run unit-test |
| 69 | + |
| 70 | + - name: Run tests |
| 71 | + |
| 72 | + with: |
| 73 | + run: npm run test |
| 74 | + env: |
| 75 | + CODE_VERSION: ${{ matrix.version }} |
| 76 | + VSCODEGO_BEFORE_RELEASE_TESTS: true |
| 77 | + |
| 78 | + - name: Lint check |
| 79 | + run: npm run lint |
| 80 | + if: ${{ matrix.os }} == 'ubuntu-latest' && ${{ matrix.version }} == 'stable' && !contains(${{ matrix.go }}, "beta") && !contains(${{ matrix.go }}, "rc") |
0 commit comments