mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-09-21 17:04:00 +00:00
Merge pull request #474 from bbassie/feature/node-ci
Add a Node.js CI workflow that builds and tests inside clusterio
This commit is contained in:
@@ -0,0 +1,51 @@
|
|||||||
|
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 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
|
||||||
+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