blob: 79b783d2244093b82e8c8bf4265268dc9ce66cfb [file] [log] [blame]
name: Long Tests
on: [push]
jobs:
build:
name: ${{ matrix.os }} ${{ matrix.version }} ${{ matrix.go }}
runs-on: ${{ matrix.os }}
# Not containing 'SKIP CI' in the commit message AND
# (Either the official repository, or the commit message contains 'FORCE RUN CI')
if: (github.repository == 'golang/vscode-go' || contains(github.event.head_commit.message, 'FORCE RUN CI')) && !contains(github.event.head_commit.message, 'SKIP CI')
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest] # TODO: reenable macos-latest
version: ['stable']
go: ['1.16', '1.17', '1.18', '1.19']
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
check-latest: true
cache: true
- name: Install dependencies
run: npm ci
- name: Compile
run: npm run vscode:prepublish
# TODO: use `go install` when we all move to 1.16+ (see build/all.bash)
- name: Install Go tools (Modules mode)
run: |
go version
go run ./tools/installtools/main.go
env:
GO111MODULE: on
EXT: "${{ matrix.os == 'windows-latest' && '.exe' || ''}}"
- name: Run unit tests
run: npm run unit-test
- name: Run tests
uses: GabrielBB/xvfb-action@86d97bde4a65fe9b290c0b3fb92c2c4ed0e5302d
with:
run: npm run test
env:
CODE_VERSION: ${{ matrix.version }}
- name: Lint check
run: npm run lint
if: ${{ matrix.os == 'ubuntu-latest' && matrix.version == 'stable' }}