2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-12-22 18:18:55 +00:00

CI: okay GHA, no variables

This commit is contained in:
Ronan Jouchet 2022-05-01 23:06:25 -04:00
parent 6af4e774e2
commit 458c7ec178

View File

@ -8,28 +8,19 @@ on:
branches: branches:
- master - master
env: # - 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 # - Bumping the *maximum* tested Node version? You must bump also: publish.yml
#
# 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
jobs: jobs:
tests: tests:
strategy: strategy:
matrix: matrix:
node-version: node-version:
- $MINIMUM_NODE_VERSION - '12' # the oldest we require in package.json -> engines.node, to check we run on this minimum
- $MAXIMUM_NODE_VERSION - '18'
platform: [ubuntu-latest, macos-latest, windows-latest] platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }} runs-on: ${{ matrix.platform }}
steps: steps:
@ -39,31 +30,34 @@ jobs:
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: 'npm' cache: 'npm'
cache-dependency-path: ${{ env.CACHE_DEPENDENCY_PATH }} cache-dependency-path: npm-shrinkwrap.json app/npm-shrinkwrap.json package-lock.json app/package-lock.json
- run: npm ci --no-fund # Will also (via `prepare` hook): 1. install ./app, 2. build - env: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: npm ci --no-fund # Will also (via `prepare` hook): 1. install ./app, 2. build
- run: npm run test -- --testPathIgnorePatterns ".*playwright.*" - run: npm run test -- --testPathIgnorePatterns ".*playwright.*"
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Use Node.js ${{ env.MAXIMUM_NODE_VERSION }} - name: Use Node.js 18
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: ${{ env.MAXIMUM_NODE_VERSION }} node-version: 18
cache: 'npm' cache: 'npm'
cache-dependency-path: ${{ env.CACHE_DEPENDENCY_PATH }} cache-dependency-path: npm-shrinkwrap.json app/npm-shrinkwrap.json package-lock.json app/package-lock.json
- run: npm ci --no-fund # Will also (via `prepare` hook): 1. install ./app, 2. build - env: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: npm ci --no-fund # Will also (via `prepare` hook): 1. install ./app, 2. build
- run: npm run lint - run: npm run lint
playwright: playwright:
runs-on: windows-latest # Doesn't work on headless ubuntu, and is slow on mac runs-on: windows-latest # Doesn't work on headless ubuntu, and is slow on mac
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Use Node.js ${{ env.MAXIMUM_NODE_VERSION }} - name: Use Node.js 18
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: ${{ env.MAXIMUM_NODE_VERSION }} node-version: 18
cache: 'npm' cache: 'npm'
cache-dependency-path: ${{ env.CACHE_DEPENDENCY_PATH }} cache-dependency-path: npm-shrinkwrap.json app/npm-shrinkwrap.json package-lock.json app/package-lock.json
- run: npm ci --no-fund # Will also (via `prepare` hook): 1. install ./app, 2. build - env: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: npm ci --no-fund # Will also (via `prepare` hook): 1. install ./app, 2. build
- run: npm run test:playwright - run: npm run test:playwright
timeout-minutes: 5 timeout-minutes: 5