80 строки
2.4 KiB
YAML
80 строки
2.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- v[0-9]+.[0-9]+.[0-9]+*
|
|
pull_request:
|
|
|
|
jobs:
|
|
fast-tests:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [windows-latest, macOS-latest, ubuntu-latest]
|
|
steps:
|
|
- name: Fix git checkout line endings
|
|
run: git config --global core.autocrlf input
|
|
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0
|
|
- name: Use Node.js 14.x
|
|
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 #v.3.5.1
|
|
with:
|
|
node-version: 14.x
|
|
cache: yarn
|
|
- name: Install npm 8 on Windows
|
|
if: matrix.os == 'windows-latest'
|
|
run: |
|
|
npm install -g npm@8
|
|
- name: Install
|
|
run: yarn install
|
|
- name: Lint
|
|
run: yarn lint
|
|
- name: Ensure packages in sync
|
|
run: yarn syncpack
|
|
- name: Build
|
|
run: yarn build
|
|
- name: Run tests
|
|
run: yarn test:fast
|
|
|
|
slow-tests:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [windows-latest, macOS-latest, ubuntu-20.04]
|
|
steps:
|
|
- name: Fix git checkout line endings
|
|
run: git config --global core.autocrlf input
|
|
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0
|
|
- name: Windows specific setup
|
|
if: matrix.os == 'windows-latest'
|
|
shell: bash
|
|
run: |
|
|
npm install -g npm@8
|
|
echo 'C:\Program Files (x86)\WiX Toolset v3.11\bin' >> $GITHUB_PATH
|
|
npm config set node-gyp "$GITHUB_WORKSPACE\node_modules\node-gyp\bin\node-gyp.js"
|
|
- name: Linux specific setup
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: |
|
|
sudo add-apt-repository -y ppa:alexlarsson/flatpak
|
|
sudo rm /etc/apt/sources.list.d/bazel.list
|
|
sudo rm /etc/apt/sources.list.d/mongo*.list
|
|
grep -l opensuse /etc/apt/sources.list.d/* | xargs sudo rm
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends snapcraft flatpak-builder elfutils
|
|
ci/install_runtimes.sh
|
|
- name: Use Node.js 14.x
|
|
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 #v.3.5.1
|
|
with:
|
|
node-version: 14.x
|
|
cache: yarn
|
|
- name: Install
|
|
run: yarn install --frozen-lockfile
|
|
- name: Build
|
|
run: yarn build
|
|
- name: Test
|
|
run: yarn test:slow
|
|
env:
|
|
DEBUG: electron-installer-snap:snapcraft
|