blob: 0027c8ee9ea74dffba0d74d47fc4b6bf3f31bf7e [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.19', '1.20', '1.21', '1.22']
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: './extension/package-lock.json'
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
check-latest: true
cache: true
- name: Install dependencies
run: npm ci
working-directory: ./extension
- name: Compile
run: npm run vscode:prepublish
working-directory: ./extension
- name: Install Go tools (Modules mode)
run: |
go version
go run ./tools/installtools/main.go
working-directory: ./extension
env:
GO111MODULE: on
EXT: "${{ matrix.os == 'windows-latest' && '.exe' || ''}}"
- name: Run unit tests
run: npm run unit-test
working-directory: ./extension
- name: Run tests (Linux)
run: xvfb-run -a npm run test
working-directory: ./extension
if: ${{ matrix.os == 'ubuntu-latest' }}
env:
CODE_VERSION: ${{ matrix.version }}
- name: Run tests (Windows/Mac)
run: npm run test
working-directory: ./extension
if: ${{ matrix.os != 'ubuntu-latest' }}
env:
CODE_VERSION: ${{ matrix.version }}
- name: Lint check
run: npm run lint
working-directory: ./extension
if: ${{ matrix.os == 'ubuntu-latest' && matrix.version == 'stable' }}