Skip to content

Commit 250e633

Browse files
committed
build: fixes for deprecations in GitHub CI
GitHub CI the basic git clone step, not as a built-in or stable feature but as versioned consumer software. Further more, the `actions/checkout` software wraps its `git` commands in a Node.js script. This, of course, couldn't be a standalone Node.js script, no, we need to also involve more than 80 npm packages as dependencies. (These are non-dev dependencies, the code in question has another 1,461 dev dependencies.). Lastly, we couldn't possibly run this on the base image which GitHub pre-installs Node.js LTS on. No we must have our own container with its own copy of Node.js. That way, we can tell the world that "millions of developers" rely on Docker and Node.js to power their CI. Our mission? To tell those same millions of non-paying customers (i.e. "products") that they have dared to use an outdated version of Node.js and that they must upgrade their CI or else. How? Because of a chain reaction in incompetence: * The internal GitHub system that builds the Docker containers for `actions/checkout` and other actions, goes through a pointless semver-major cycle every six months. Rather than something reasonable like https://github.com/nvm-sh/nvm which is able to install any arbitrary Node.js version, GitHub's Node.js installer is effectively tied to a single Node.js version, so whenever Node.js has a major release, GitHub's system goes through a semver-major cycle as well, and we must of course deprecate the old thing. * GitHub then naturally has to update `actions/checkout` to internally use the newer Node.js version from time to time. This change isn't observable to end-users since the embedded Node.js isn't exposed. But, since following semver.org is no longer "cool" in 2024, GitHub will do a pointless semver-major bump because one of its dependencies did, and the line must go up! * GitHub then has to "deprecate" the Node.js provisioner to no longer have to "support" installing the older Node.js version. Again, for a reasonable system like nvm-sh there is nothing to "support". The end result, you as the end-user simply declaring your CI job to perform `actions/checkout@v3` will be told that "you" are using Node.js 16 and must upgrade. With a link to a blog post like this one: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/ It's almost like Microsoft is intentionally creating unusable software for their competitors to use, to then sell you "AI" to get halfway back to normal levels of productivity.
1 parent 8b5438f commit 250e633

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

.github/workflows/CI.yaml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,12 @@ on:
55

66
jobs:
77
test:
8-
# Includes 'firefox', 'chromium', and more.
9-
# https://github.com/actions/runner-images/blob/ubuntu22/20230402.1/images/linux/Ubuntu2204-Readme.md
8+
# Includes firefox, chromium, and Node.js 18.
9+
# https://github.com/actions/runner-images/blob/ubuntu22/20240403.1/images/ubuntu/Ubuntu2204-Readme.md
1010
runs-on: ubuntu-22.04
1111
env:
1212
FORCE_COLOR: "1"
1313
steps:
14-
- uses: actions/checkout@v3
15-
- uses: actions/cache@v3
16-
with:
17-
path: ~/.npm
18-
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
19-
- uses: actions/[email protected]
20-
with:
21-
node-version: 18.x
14+
- uses: actions/checkout@v4
2215
- run: npm install
2316
- run: npm test

.github/workflows/coverage.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,13 @@ concurrency:
1515

1616
jobs:
1717
deploy:
18+
# Includes firefox, chromium, and Node.js 18.
19+
# https://github.com/actions/runner-images/blob/ubuntu22/20240403.1/images/ubuntu/Ubuntu2204-Readme.md
1820
runs-on: ubuntu-22.04
1921
env:
2022
FORCE_COLOR: "1"
2123
steps:
22-
- uses: actions/checkout@v3
23-
- uses: actions/cache@v3
24-
with:
25-
path: ~/.npm
26-
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
27-
- uses: actions/[email protected]
28-
with:
29-
node-version: 18.x
24+
- uses: actions/checkout@v4
3025
- run: npm install
3126

3227
- name: Generate coverage

0 commit comments

Comments
 (0)