Skip to content

Commit

Permalink
Upgrade CI Node/OS versions (#555)
Browse files Browse the repository at this point in the history
- Updates
  - Add Node 19
    - But skip GitHub caching tests for Node 19, due to extreme slowness (will investigate, #554)
  - Upgrade Ubuntu and macOS versions
  - Update to latest Wireit for #547 which should improve Windows test reliability
- Update documentation about latest Node releases.
- Keep number of jobs under control
  - Remove Windows/macOS + Node 16/18 jobs, to keep the number of jobs under control. Otherwise, by adding Node 19 we would go from 9 to 12 jobs. Now we have 8 jobs. I think testing just the oldest and newest releases on Windows/macOS should be sufficient, with Linux alone covering the releases inbetween.
  - Fold garbage collection tests into the main job on all configs, since it's more reliable than I first guessed, so we don't need a dedicated job.
  • Loading branch information
aomarks committed Nov 19, 2022
1 parent d2a23b5 commit ee8ec42
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 35 deletions.
44 changes: 24 additions & 20 deletions .github/workflows/tests.yml
Expand Up @@ -5,11 +5,29 @@ on: [push, pull_request]
jobs:
tests:
strategy:
# We support Node Latest, Active LTS, and the most recent Maintenance LTS.
# See https://nodejs.org/en/about/releases/ for Node release schedule.
# We support Node Current, LTS, and Maintenance. See
# https://nodejs.org/en/about/releases/ for release schedule.
#
# We test all supported Node versions on Linux, and the oldest and newest
# on macOS/Windows.
matrix:
node: [14, 16, 18]
os: [ubuntu-20.04, macos-11, windows-2022]
include:
- node: 14
os: ubuntu-22.04
- node: 14
os: macos-12
- node: 14
os: windows-2022
- node: 16
os: ubuntu-22.04
- node: 18
os: ubuntu-22.04
- node: 19
os: ubuntu-22.04
- node: 19
os: macos-12
- node: 19
os: windows-2022

# Allow all matrix configurations to complete, instead of cancelling as
# soon as one fails. Useful because we often have different kinds of
Expand Down Expand Up @@ -51,28 +69,14 @@ jobs:

lint-and-format:
timeout-minutes: 5
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: npm

- run: npm ci
- run: npm run lint
- run: npm run format:check

test-garbage-collection:
timeout-minutes: 5
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- uses: google/wireit@setup-github-actions-caching/v1

- run: npm ci
- run: npm run test:gc
15 changes: 9 additions & 6 deletions README.md
Expand Up @@ -836,13 +836,16 @@ input also affects the fingerprint:

Wireit is supported on Linux, macOS, and Windows.

Wireit is supported on Node Current (18), Active LTS (16), and the most recent
Maintenance LTS (14). See [Node releases](https://nodejs.org/en/about/releases/)
for the schedule.
Wireit is supported on Node Current (19), LTS (18), and Maintenance (16 and 14).
See [Node releases](https://nodejs.org/en/about/releases/) for the schedule.

Wireit is supported on the npm versions that ship with the above supported Node
versions (5 and 6), Yarn Classic (1), and on the latest versions of Yarn Berry
(3) and pnpm (7).
> **Warning**
> Wireit will no longer work with Node 14 when it reaches end-of-life on
> 2023-04-30. We recommend upgrading to Node 18 as soon as possible.
Wireit is supported on the npm versions that ship with the latest versions of
the above supported Node versions (6 and 8), Yarn Classic (1), Yarn Berry (3),
and pnpm (7).

## Related tools

Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -90,6 +90,7 @@
"test:freshness",
"test:glob",
"test:ide",
"test:gc",
"test:json-schema",
"test:optimize-mkdirs",
"test:parallelism",
Expand Down Expand Up @@ -316,7 +317,7 @@
"vscode-languageclient": "^8.0.1",
"vscode-languageserver": "^8.0.1",
"vscode-languageserver-textdocument": "^1.0.4",
"wireit": "^0.7.3-pre.3",
"wireit": "^0.8.0",
"yarn": "^1.22.18"
},
"prettier": {
Expand Down
10 changes: 9 additions & 1 deletion src/test/cache-github.test.ts
Expand Up @@ -15,6 +15,7 @@ import {WireitTestRig} from './util/test-rig.js';
import {registerCommonCacheTests} from './cache-common.js';
import {FakeGitHubActionsCacheServer} from './util/fake-github-actions-cache-server.js';
import {timeout, DEFAULT_UVU_TIMEOUT} from './util/uvu-timeout.js';
import {NODE_MAJOR_VERSION} from './util/node-version.js';

const __filename = fileURLToPath(import.meta.url);
const __dirname = pathlib.dirname(__filename);
Expand Down Expand Up @@ -415,4 +416,11 @@ test(
}, Math.max(DEFAULT_UVU_TIMEOUT, 15_000))
);

test.run();
if (NODE_MAJOR_VERSION === 19) {
console.error(
'Skipping GitHub caching tests on Node 19 due to performance issue, ' +
'see https://github.com/google/wireit/issues/554'
);
} else {
test.run();
}

0 comments on commit ee8ec42

Please sign in to comment.