Files
factorio-expcluster/.github/workflows/node.yml
T
bbassieandClaude Opus 5.5 3687a7a527 Check the changelog section of pull request descriptions in CI
Ports the clusterio versions of the changelog scripts. pr_to_changelog.mts
gains the Contributors and Statistics blocks and a shared
checkPullRequestBody, which check_pr_changelog.mts runs on every pull
request through the new Changelog workflow. The latest release is now the
newest one targeting main. Adds the pull request template the check
expects, and node --test runs the script tests in Node.js CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 14:32:21 +00:00

54 lines
1.7 KiB
YAML

name: Node.js CI
on:
push:
pull_request:
env:
# The packages use workspace:^ and catalog: versions, so they only resolve
# inside a clusterio checkout with this repository under external_plugins
CLUSTERIO_REPOSITORY: clusterio/clusterio
CLUSTERIO_REF: master
# Node version to use for the tests. This is used by the setup-node action
NODE_VERSION: lts/*
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
defaults:
run:
working-directory: external_plugins/ExpCluster
steps:
- name: Checkout Clusterio
uses: actions/checkout@v4
with:
repository: ${{ env.CLUSTERIO_REPOSITORY }}
ref: ${{ env.CLUSTERIO_REF }}
- name: Checkout ExpCluster
uses: actions/checkout@v4
with:
path: external_plugins/ExpCluster
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install and build
working-directory: .
run: pnpm install --no-frozen-lockfile
- name: Run tests
run: pnpm --filter "@expcluster/*" run test
- name: Run script tests
run: node --test test/*.test.js
- name: Run reference checks
run: |
# pnpm install runs prepare in dependency order, which hides missing
# project references. Building from an empty dist one package at a time
# will fail unless every cross package import is referenced correctly.
for pkg in exp_*/; do
rm -rf exp_*/dist
echo "::group::${pkg%/}"
(cd "$pkg" && pnpm exec tsc --build)
echo "::endgroup::"
done