2020-11-22 02:28:14 +00:00
|
|
|
name: ci
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-12-25 21:42:48 +00:00
|
|
|
- master
|
2020-11-22 02:28:14 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
2021-12-25 21:42:48 +00:00
|
|
|
- master
|
2020-11-22 02:28:14 +00:00
|
|
|
|
2022-05-02 02:59:39 +00:00
|
|
|
env:
|
|
|
|
# Bumping the *minimum* required Node version? You must bump:
|
|
|
|
# 1. package.json -> engines.node
|
|
|
|
# 2. package.json -> devDependencies.@types/node
|
|
|
|
# 3. tsconfig.json -> {target, lib}
|
|
|
|
# 4. .github/workflows/ci.yml -> node-version
|
|
|
|
#
|
|
|
|
# Here in ci.yml, we want to always run the oldest version we require in
|
|
|
|
# package.json -> engines.node, to be sure Nativefier runs on this minimum
|
|
|
|
MINIMUM_NODE_VERSION: '12'
|
|
|
|
# Bumping the *maximum* tested Node version? You must bump also: publish.yml
|
|
|
|
MAXIMUM_NODE_VERSION: '18'
|
|
|
|
CACHE_DEPENDENCY_PATH: npm-shrinkwrap.json app/npm-shrinkwrap.json package-lock.json app/package-lock.json
|
|
|
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
|
|
|
|
2020-11-22 02:28:14 +00:00
|
|
|
jobs:
|
2022-05-02 02:59:39 +00:00
|
|
|
tests:
|
2020-11-22 02:28:14 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version:
|
2022-05-02 02:59:39 +00:00
|
|
|
- ${{ env.MINIMUM_NODE_VERSION }}
|
|
|
|
- ${{ env.MAXIMUM_NODE_VERSION }}
|
2020-11-22 02:28:14 +00:00
|
|
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
steps:
|
2021-12-25 21:42:48 +00:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
cache: 'npm'
|
2022-05-02 02:59:39 +00:00
|
|
|
cache-dependency-path: ${{ env.CACHE_DEPENDENCY_PATH }}
|
|
|
|
- run: npm ci --no-fund # Will also (via `prepare` hook): 1. install ./app, 2. build
|
|
|
|
- run: npm run test -- --testPathIgnorePatterns ".*playwright.*"
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Use Node.js ${{ env.MAXIMUM_NODE_VERSION }}
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: ${{ env.MAXIMUM_NODE_VERSION }}
|
|
|
|
cache: 'npm'
|
|
|
|
cache-dependency-path: ${{ env.CACHE_DEPENDENCY_PATH }}
|
|
|
|
- run: npm ci --no-fund # Will also (via `prepare` hook): 1. install ./app, 2. build
|
|
|
|
- run: npm run lint
|
|
|
|
playwright:
|
|
|
|
runs-on: windows-latest # Doesn't work on headless ubuntu, and is slow on mac
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Use Node.js ${{ env.MAXIMUM_NODE_VERSION }}
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: ${{ env.MAXIMUM_NODE_VERSION }}
|
|
|
|
cache: 'npm'
|
|
|
|
cache-dependency-path: ${{ env.CACHE_DEPENDENCY_PATH }}
|
|
|
|
- run: npm ci --no-fund # Will also (via `prepare` hook): 1. install ./app, 2. build
|
|
|
|
- run: npm run test:playwright
|
2022-04-22 14:51:00 +00:00
|
|
|
timeout-minutes: 5
|