mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2025-02-02 11:48:25 +00:00
build/ci workflow: try to use setup-node-v2 cache to speed up build
This commit is contained in:
parent
24e8849564
commit
797922afb6
54
.github/workflows/ci.yml
vendored
54
.github/workflows/ci.yml
vendored
@ -3,38 +3,44 @@ name: ci
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version:
|
node-version:
|
||||||
# Align the top Node version here with: 1. linter conditions later below, 2. publish.yml.
|
# Align the top Node version here with: 1. linter conditions later below, 2. publish.yml.
|
||||||
- 17.x
|
- 17.x
|
||||||
# Bumping the minimum required Node version? You must bump:
|
# Bumping the minimum required Node version? You must bump:
|
||||||
# 1. package.json -> engines.node
|
# 1. package.json -> engines.node
|
||||||
# 2. package.json -> devDependencies.@types/node
|
# 2. package.json -> devDependencies.@types/node
|
||||||
# 3. tsconfig.json -> {target, lib}
|
# 3. tsconfig.json -> {target, lib}
|
||||||
# 4. .github/workflows/ci.yml -> node-version
|
# 4. .github/workflows/ci.yml -> node-version
|
||||||
#
|
#
|
||||||
# Here in ci.yml, we want to always run the oldest version we require in
|
# 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
|
# package.json -> engines.node, to be sure Nativefier runs on this minimum
|
||||||
- 12.x
|
- 12.x
|
||||||
platform: [ubuntu-latest, macos-latest, windows-latest]
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
# Will also (through `prepare` hook): 1. install ./app, and 2. build
|
cache: 'npm'
|
||||||
- run: npm ci --no-fund
|
cache-dependency-path: |
|
||||||
# Only run linter once, for faster CI. Align the versions of Node here with above and publish.yml.
|
npm-shrinkwrap.json
|
||||||
- if: matrix.platform == 'ubuntu-latest' && matrix.node-version == '17.x'
|
app/npm-shrinkwrap.json
|
||||||
run: npm run lint
|
package-lock.json
|
||||||
- run: npm test
|
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.
|
||||||
|
- if: matrix.platform == 'ubuntu-latest' && matrix.node-version == '17.x'
|
||||||
|
run: npm run lint
|
||||||
|
- run: npm test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user