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
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version:
|
2021-12-25 21:42:48 +00:00
|
|
|
# Align the top Node version here with: 1. linter conditions later below, 2. publish.yml.
|
2021-12-25 21:53:06 +00:00
|
|
|
- '17'
|
2021-12-25 21:42:48 +00:00
|
|
|
# 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
|
2021-12-25 21:53:06 +00:00
|
|
|
- '12'
|
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'
|
|
|
|
cache-dependency-path: |
|
|
|
|
npm-shrinkwrap.json
|
|
|
|
app/npm-shrinkwrap.json
|
|
|
|
package-lock.json
|
|
|
|
app/package-lock.json
|
|
|
|
# Will also (through `prepare` hook): 1. install ./app, and 2. build
|
|
|
|
- run: npm ci --no-fund
|
|
|
|
# Only run linter once, for faster CI. Align the versions of Node here with above and publish.yml.
|
2022-02-06 22:55:20 +00:00
|
|
|
- if: matrix.platform == 'ubuntu-latest' && matrix.node-version == '17'
|
2021-12-25 21:42:48 +00:00
|
|
|
run: npm run lint
|
|
|
|
- run: npm test
|