L: don't panic if hover help is not available (#73) #160
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [push, pull_request] | |
name: Test | |
jobs: | |
test: | |
timeout-minutes: 30 | |
strategy: | |
matrix: | |
go-version: [1.21.x, 1.22.x] | |
platform: [ubuntu-latest] | |
fail-fast: false | |
runs-on: ${{ matrix.platform }} | |
env: | |
GO111MODULE: on | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Go environment | |
run: | | |
go version | |
go env | |
echo PATH is $PATH | |
shell: bash | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Check gofmt | |
run: | | |
gofmt -l . | |
test `gofmt -l . | wc -l` = 0 | |
shell: bash | |
- name: Install gopls | |
run: go install golang.org/x/tools/gopls@latest | |
working-directory: / | |
- name: Install pyls on unix | |
if: matrix.platform != 'windows-latest' | |
run: sudo python3 -m pip install 'python-language-server[yapf]' | |
- name: Install pyls on windows | |
if: matrix.platform == 'windows-latest' | |
run: pip install 'python-language-server[yapf]' | |
- name: Check if 'go install' modified go.mod file | |
run: git diff --exit-code | |
- name: Test on unix | |
if: matrix.platform != 'windows-latest' | |
run: | | |
export PATH=${PATH}:$(go env GOPATH)/bin | |
go test -race -v ./... | |
shell: bash | |
- name: Test on windows | |
if: matrix.platform == 'windows-latest' | |
run: | | |
# 8.3 filenames causes issues. See | |
# https://github.com/actions/virtual-environments/issues/712 | |
$env:TMP = "$env:USERPROFILE\AppData\Local\Temp" | |
$env:TEMP = "$env:USERPROFILE\AppData\Local\Temp" | |
$env:path += ";C:\Users\runneradmin\go\bin" | |
go test -race -v ./... | |
- name: Cross compile for plan9 | |
if: matrix.platform == 'ubuntu-latest' | |
env: | |
GOOS: plan9 | |
run: go build ./... |