2020-12-06 21:34:18 +03:00
|
|
|
name: build
|
2020-11-21 01:52:48 +03:00
|
|
|
|
2020-12-08 22:32:39 +03:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2022-03-12 01:23:56 +03:00
|
|
|
- 'master'
|
2020-12-08 22:32:39 +03:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '**'
|
2020-11-21 01:52:48 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2022-01-26 07:18:04 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
2020-11-21 01:52:48 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout VSCodeVim
|
2022-03-02 07:57:16 +03:00
|
|
|
uses: actions/checkout@v3
|
2020-11-21 01:52:48 +03:00
|
|
|
|
|
|
|
- name: Set up Node.js
|
2023-03-12 00:27:25 +03:00
|
|
|
uses: actions/setup-node@v3
|
2020-11-21 01:52:48 +03:00
|
|
|
with:
|
2023-10-19 07:01:29 +03:00
|
|
|
node-version: 18
|
2023-04-06 00:03:58 +03:00
|
|
|
cache: yarn
|
2020-11-21 01:52:48 +03:00
|
|
|
|
|
|
|
- name: Install dependencies
|
2023-04-06 00:03:58 +03:00
|
|
|
run: yarn install --frozen-lockfile
|
2020-11-21 01:52:48 +03:00
|
|
|
|
|
|
|
- name: Prettier
|
2022-01-26 07:18:04 +03:00
|
|
|
if: matrix.os != 'windows-latest'
|
2023-03-02 04:21:23 +03:00
|
|
|
run: yarn prettier:check
|
2020-11-21 01:52:48 +03:00
|
|
|
|
|
|
|
- name: Lint
|
2023-03-02 04:29:42 +03:00
|
|
|
run: yarn lint
|
2020-11-21 01:52:48 +03:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: gulp webpack
|
|
|
|
|
2022-01-26 07:18:04 +03:00
|
|
|
- name: Test on ubuntu-latest
|
|
|
|
if: matrix.os != 'windows-latest'
|
2020-11-21 01:52:48 +03:00
|
|
|
run: |
|
|
|
|
gulp prepare-test
|
2020-12-06 23:20:18 +03:00
|
|
|
xvfb-run -a yarn test
|
2022-01-26 07:18:04 +03:00
|
|
|
|
|
|
|
- name: Test on windows-latest
|
|
|
|
if: matrix.os == 'windows-latest'
|
|
|
|
run: |
|
|
|
|
gulp prepare-test
|
|
|
|
yarn test
|