mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-09-21 17:04:00 +00:00
Add a Node.js CI workflow that builds and tests inside clusterio
The packages use workspace:^ and catalog: versions, so they only resolve inside a clusterio checkout with this repository under external_plugins. The workflow clones clusterio master, checks this repository out into external_plugins/ExpCluster, runs pnpm install (which runs every prepare script), then runs the tap suites. A last step wipes dist and runs tsc --build in each package on its own. pnpm install builds packages in dependency order, which is why the missing project references fixed in #473 went unnoticed. On the tree before #473 this step fails with the same five TS2307 errors. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
23ee68c50a
commit
5487976a21
@@ -0,0 +1,49 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 20
|
||||||
|
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 into the workspace
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: external_plugins/ExpCluster
|
||||||
|
- uses: pnpm/action-setup@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: lts/*
|
||||||
|
- name: Install and build the workspace
|
||||||
|
working-directory: .
|
||||||
|
run: pnpm install --no-frozen-lockfile
|
||||||
|
- name: Run tests
|
||||||
|
run: pnpm --filter "@expcluster/*" run test
|
||||||
|
- name: Build each package on its own
|
||||||
|
run: |
|
||||||
|
# pnpm install runs prepare in dependency order, which hides a missing
|
||||||
|
# project reference (#473). Building from an empty dist one package at
|
||||||
|
# a time fails unless every cross package import is referenced.
|
||||||
|
for pkg in exp_*/; do
|
||||||
|
rm -rf exp_*/dist
|
||||||
|
echo "::group::${pkg%/}"
|
||||||
|
(cd "$pkg" && pnpm exec tsc --build)
|
||||||
|
echo "::endgroup::"
|
||||||
|
done
|
||||||
+1
-1
@@ -9,7 +9,7 @@ For developers wanting to add features please follow these guidelines:
|
|||||||
- Lua is checked with [emmylua](https://github.com/EmmyLuaLs/emmylua-analyzer-rust), configured by `.emmyrc.json`. Install the EmmyLua extension rather than sumnekolua / luals, and use factoriomod-debug to generate the factorio api types. Note that an inline cast must be written `--[[@as T]]`, the spaced form is not parsed.
|
- Lua is checked with [emmylua](https://github.com/EmmyLuaLs/emmylua-analyzer-rust), configured by `.emmyrc.json`. Install the EmmyLua extension rather than sumnekolua / luals, and use factoriomod-debug to generate the factorio api types. Note that an inline cast must be written `--[[@as T]]`, the spaced form is not parsed.
|
||||||
- Changes should be made on your own fork and merged into `main` through a pull request.
|
- Changes should be made on your own fork and merged into `main` through a pull request.
|
||||||
- Each pull request should be limited to one feature or a few bug fixes and link to the related issue page.
|
- Each pull request should be limited to one feature or a few bug fixes and link to the related issue page.
|
||||||
- Pull requests are automatically linted and documentation checked.
|
- Pull requests are automatically linted, then built and tested against the latest clusterio `master`.
|
||||||
- Pull requests are manually reviewed to maintain code and language quality.
|
- Pull requests are manually reviewed to maintain code and language quality.
|
||||||
- New features should have the branch names: `feature/feature-name`
|
- New features should have the branch names: `feature/feature-name`
|
||||||
- Bug fixes should have the branch names: `fix/bug-name`
|
- Bug fixes should have the branch names: `fix/bug-name`
|
||||||
|
|||||||
Reference in New Issue
Block a user