Skip to content
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ jobs:

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
node-version:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we'll get confused / have some unexpected behavior when these things turn over.

Like, the day that a new version gets added, what if CI starts failing? That would be annoying to fix without a hardcoded list. WDYT?

Copy link
Copy Markdown
Contributor

@smockle smockle Jan 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unexpected behavior when these things turn over

Because the matrix includes latest, when lts/* begins pointing to a new version, no failures should occur, because that new version would have already been tested, back when it was latest. So floating version (viz. lts/-2, lts/-1, lts/*) values ought to be safe.

That said, when latest itself begins pointing to a new version, failures might occur. But if we remove latest, then lts/* loses the safety described above.

Copy link
Copy Markdown
Contributor

@smockle smockle Jan 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when latest itself begins pointing to a new version, failures might occur

Here’s one workaround: For latest (and only latest), if any step of the job fails (failure()), open an issue, then exit 0, so the overall workflow run is still green.

So, we’d still be notified of failures, but they wouldn’t block PRs (unless another version is also failing), etc.

Copy link
Copy Markdown
Contributor Author

@theinterned theinterned Jan 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay! cool. I got this working!

Here's a sample failed run: https://github.com/github/eslint-plugin-github/actions/runs/3884555154, and the issue it created: #378

To test this I created a failing test 20e83a5 which I will now delete.

- lts/-2
- lts/-1
- lts/*
- latest

steps:
- uses: actions/checkout@v3
Expand Down