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 03:06:25 +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
|
|
|
|
# - Bumping the *maximum* tested Node version? You must bump also: publish.yml
|
2020-11-22 02:28:14 +00:00
|
|
|
jobs:
|
2022-05-02 03:58:37 +00:00
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
2020-11-22 02:28:14 +00:00
|
|
|
steps:
|
2021-12-25 21:42:48 +00:00
|
|
|
- uses: actions/checkout@v2
|
2023-08-03 17:35:19 +00:00
|
|
|
- name: Use Node.js 20
|
2021-12-25 21:42:48 +00:00
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
2023-08-03 17:35:19 +00:00
|
|
|
node-version: 20
|
2021-12-25 21:42:48 +00:00
|
|
|
cache: 'npm'
|
2022-05-02 03:10:11 +00:00
|
|
|
cache-dependency-path: |
|
|
|
|
npm-shrinkwrap.json
|
|
|
|
app/npm-shrinkwrap.json
|
|
|
|
package-lock.json
|
|
|
|
app/package-lock.json
|
2022-05-02 03:06:56 +00:00
|
|
|
- env:
|
|
|
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
2022-05-02 03:06:25 +00:00
|
|
|
run: npm ci --no-fund # Will also (via `prepare` hook): 1. install ./app, 2. build
|
2022-05-02 03:58:37 +00:00
|
|
|
- run: npm run lint
|
|
|
|
playwright:
|
|
|
|
runs-on: windows-latest # Doesn't work on headless ubuntu, and is slow on mac
|
2022-05-02 02:59:39 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2023-08-03 17:35:19 +00:00
|
|
|
- name: Use Node.js 20
|
2022-05-02 02:59:39 +00:00
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
2023-08-03 17:35:19 +00:00
|
|
|
node-version: 20
|
2022-05-02 02:59:39 +00:00
|
|
|
cache: 'npm'
|
2022-05-02 03:10:11 +00:00
|
|
|
cache-dependency-path: |
|
|
|
|
npm-shrinkwrap.json
|
|
|
|
app/npm-shrinkwrap.json
|
|
|
|
package-lock.json
|
|
|
|
app/package-lock.json
|
2022-05-02 03:06:56 +00:00
|
|
|
- env:
|
|
|
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
2022-05-02 03:06:25 +00:00
|
|
|
run: npm ci --no-fund # Will also (via `prepare` hook): 1. install ./app, 2. build
|
2022-05-02 03:58:37 +00:00
|
|
|
- run: npm run test:playwright
|
|
|
|
timeout-minutes: 5
|
2022-07-24 15:24:59 +00:00
|
|
|
# Useful to debug PlayWright tests failing in CI
|
|
|
|
# env:
|
|
|
|
# DEBUG: pw:browser*
|
2022-05-02 03:58:37 +00:00
|
|
|
tests:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version:
|
2023-08-03 17:35:19 +00:00
|
|
|
- '20'
|
|
|
|
- '16' # the oldest we require in package.json -> engines.node, to check we run on this minimum
|
2022-05-02 03:58:37 +00:00
|
|
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
runs-on: ${{ matrix.platform }}
|
2022-05-02 02:59:39 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-05-02 03:58:37 +00:00
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
2022-05-02 02:59:39 +00:00
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
2022-05-02 03:58:37 +00:00
|
|
|
node-version: ${{ matrix.node-version }}
|
2022-05-02 02:59:39 +00:00
|
|
|
cache: 'npm'
|
2022-05-02 03:10:11 +00:00
|
|
|
cache-dependency-path: |
|
|
|
|
npm-shrinkwrap.json
|
|
|
|
app/npm-shrinkwrap.json
|
|
|
|
package-lock.json
|
|
|
|
app/package-lock.json
|
2022-05-02 03:06:56 +00:00
|
|
|
- env:
|
|
|
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
2022-05-02 03:06:25 +00:00
|
|
|
run: npm ci --no-fund # Will also (via `prepare` hook): 1. install ./app, 2. build
|
2022-05-02 04:27:58 +00:00
|
|
|
- run: npm run test:noplaywright
|