Bump @types/node from 22.15.19 to 22.15.21 in /javascript #998
This file contains hidden or 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
name: JavaScript 🟨🟦🟩🟥 Tests 🦂 | |
on: | |
push: | |
branches-ignore: | |
- 'main' | |
paths: | |
- 'javascript/**' | |
- '!javascript/**.md' | |
- '!javascript/.vscode/**' | |
- '.github/workflows/javascript-*' | |
pull_request: | |
branches: | |
- 'main' | |
paths: | |
- 'javascript/**' | |
- '!javascript/**.md' | |
- '!javascript/.vscode/**' | |
- '.github/workflows/javascript-*' | |
schedule: # 9AM on the 15th | |
- cron: 0 22 14 1,2,3,10,11,12 * # AEDT Months | |
- cron: 0 23 14 4,5,6,7,8,9 * # AEST Months | |
workflow_call: | |
permissions: {} | |
defaults: | |
run: | |
shell: bash | |
working-directory: javascript | |
jobs: | |
quick-test: | |
name: JavaScript 🟨🟦🟩🟥 Quick Test 🦂 | |
if: ${{ github.event_name == 'push' && !(github.event.ref == 'refs/heads/main') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🏁 Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
# Although the full test strips the nvm wrap, this setup node is purely | |
# performative ~ the `make setup` without the `_=""` with run via nvm. | |
- name: 🟨🟦🟩🟥 Set up Node | |
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
with: | |
node-version-file: 'javascript/.nvmrc' | |
cache: 'npm' | |
cache-dependency-path: javascript/package-lock.json | |
- name: 🧱 Install build dependencies | |
run: make setup | |
- name: 🦂 Test | |
run: make test | |
- name: 🧹 Lint | |
run: make lint | |
- name: ⚖ Does the checked in JS match the transpiled TS? | |
run: make verify_transpiled_checkin | |
- name: ⭐ JSR dry-run | |
run: npm run publish:jsr:dry | |
full-test: | |
name: JavaScript 🟨🟦🟩🟥 Full Test 🦂 | |
if: >- | |
${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || | |
(github.event_name == 'push' && github.event.ref == 'refs/heads/main') }} | |
runs-on: '${{ matrix.os }}' | |
strategy: | |
fail-fast: false | |
matrix: | |
# Try to track https://nodejs.org/en/about/previous-releases | |
version: ['20', '22', '23'] # See package.json's "engines" | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
steps: | |
- name: 🏁 Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: 🟨🟦🟩🟥 Set up Node ${{ matrix.version }} | |
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
with: | |
node-version: '${{ matrix.version }}' | |
cache: 'npm' | |
cache-dependency-path: javascript/package-lock.json | |
# Strip the nvm wrapping for the "full test" (it's still required by the necessary "quick test") | |
- name: 🧱 Install build dependencies | |
run: make setup _='' INSTALL_NODE='' | |
- name: 🦂 Test | |
run: make test _='' | |
- name: 🧹 Lint | |
run: make lint _='' | |
# We probably don't need to do this on all runners, and the windows CRLF echos are annoying | |
# - name: ⚖ Does the checked in JS match the transpiled TS? | |
# run: make verify_transpiled_checkin | |
built-example: | |
name: JavaScript 🟨🟦🟩🟥 Build Example 🦛 | |
if: >- | |
${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || | |
(github.event_name == 'push' && github.event.ref == 'refs/heads/main') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🏁 Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: 🟨🟦🟩🟥 Set up Node | |
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
with: | |
node-version-file: 'javascript/.nvmrc' | |
cache: 'npm' | |
cache-dependency-path: javascript/package-lock.json | |
- name: 🧱 Install build dependencies | |
run: make setup | |
- name: 🧱 Build | |
run: make build | |
- name: 🆙 Upload dists | |
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
with: | |
name: Package | |
path: javascript/skenvy-collatz-*.tgz | |
if-no-files-found: error | |
retention-days: 1 | |
usage-demonstration: | |
name: JavaScript 🟨🟦🟩🟥 Usage Demonstration 🦏 | |
needs: [built-example] | |
if: >- | |
${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || | |
(github.event_name == 'push' && github.event.ref == 'refs/heads/main') }} | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: javascript/.demo | |
steps: | |
- name: 🏁 Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: 🟨🟦🟩🟥 Set up Node | |
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
with: | |
node-version-file: 'javascript/.nvmrc' | |
- name: 🆒 Download dists | |
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
with: | |
name: Package | |
path: javascript/.demo | |
- name: 🦛 Install this package | |
run: npm run setup | |
- name: 🦏 Transpile and run demonstration; 🦑 CJS | |
run: npm run everything:cjs | |
- name: 🦏 Transpile and run demonstration; 🐙 ESM | |
run: npm run everything:esm | |
codeql: | |
name: JavaScript 🟨🟦🟩🟥 CodeQL 🛡👨💻🛡 | |
if: >- | |
${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || | |
(github.event_name == 'push' && github.event.ref == 'refs/heads/main') }} | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
uses: ./.github/workflows/github-codeql.yaml | |
with: | |
language: 'javascript' | |
docs: | |
name: JavaScript 🟨🟦🟩🟥 Docs 📄 Quick Test 🦂 | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🏁 Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: 🟨🟦🟩🟥 Set up Node | |
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
with: | |
node-version-file: 'javascript/.nvmrc' | |
cache: 'npm' | |
cache-dependency-path: javascript/package-lock.json | |
- name: 🧱 Install build dependencies | |
run: make setup | |
- name: 📄 Docs | |
run: make docs |