forked from MithrilJS/mithril.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to Node 20, clean up workflows (MithrilJS#2902)
Tests still appear to fail per MithrilJS#2898. Unfortunately, I need actions/runner#2347 to ignore the test failures properly - I need them to be warnings, not hard errors.
- Loading branch information
1 parent
7cf72ff
commit 9d9e0e7
Showing
9 changed files
with
101 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# In the future, I'd like to fold this into its own action under the Mithril.js | ||
# org and include `actions/checkout` as well. It'd simplify maintenance a bit | ||
# and I could reuse it across multiple repos. | ||
name: Setup CI context | ||
description: Sets up repo and Node context and installs packages | ||
|
||
inputs: | ||
# See supported Node.js release schedule here: | ||
# https://github.com/nodejs/Release | ||
node-version: | ||
default: 20 | ||
description: The Node version to use | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
- run: npm ci | ||
shell: bash |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
name: 'Push `master`' | ||
name: Warn on pushing to `master` | ||
on: | ||
pull_request: | ||
types: [opened] | ||
branches: ['master'] | ||
branches: [master] | ||
permissions: | ||
issues: write | ||
jobs: | ||
comment: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/github-script@v3 | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
await github.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: `⚠⚠⚠ Hey @${context.actor}, did you mean to open this against \`next\`? ⚠⚠⚠` | ||
}) | ||
- run: | | ||
gh issue comment ${{ github.event.pull_request.url }} \ | ||
--body '⚠⚠⚠ Hey @${{ github.actor }}, did you mean to open this against `next`? ⚠⚠⚠' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
name: Post alert comment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
22 changes: 7 additions & 15 deletions
22
.github/workflows/pr.yml → .github/workflows/test-next-push.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: test | ||
|
||
on: | ||
pull_request: | ||
branches: [ next ] | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
permissions: | ||
actions: write | ||
contents: read | ||
|
||
# This uses actions/checkout instead of `git clone` directly since it's way | ||
# easier than parsing everything out. | ||
|
||
jobs: | ||
lint-docs: | ||
# https://github.com/MithrilJS/mithril.js/issues/2898 | ||
# Semantics aren't quite what I'd prefer. This is what I'd really want: | ||
# https://github.com/actions/runner/issues/2347#issue-comment-box | ||
continue-on-error: true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup | ||
- run: npm run lint:docs | ||
|
||
lint-js: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup | ||
- run: npm run lint:js | ||
|
||
build-js: | ||
needs: lint-js | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup | ||
- run: npm run build | ||
|
||
test-js: | ||
needs: build-js | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
node-version: | ||
- 16 | ||
- 18 | ||
- 20 | ||
- 22 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm run test:js |