refactor: modularize orchestration and remove lim references #42
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: CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| paths-ignore: | |
| - "docs/**" | |
| - "**/*.md" | |
| pull_request: | |
| paths-ignore: | |
| - "docs/**" | |
| - "**/*.md" | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.22.0" | |
| cache: "npm" | |
| - run: npm ci | |
| - run: npm run build | |
| - name: Run tests (with debug tail on failure) | |
| run: | | |
| set -o pipefail | |
| node --test dist/**/*.test.js > ci-test.log 2>&1 || { | |
| echo "---- failing markers (not ok / ERR / Error) ----" | |
| grep -nE "not ok|ERR_|Error \\[|failureType|exitCode" ci-test.log | tail -n 80 || true | |
| echo "---- tail(ci-test.log) ----" | |
| tail -n 200 ci-test.log || true | |
| markers=$(grep -nE "not ok|ERR_|Error \\[|failureType|exitCode" ci-test.log | tail -n 40 || true) | |
| snippet="${markers}\n\n$(tail -n 80 ci-test.log)" | |
| details=$(printf "%b" "$snippet" | sed -e 's/%/%25/g' -e 's/\r/%0D/g' -e ':a;N;$!ba;s/\n/%0A/g') | |
| echo "::error title=Node test failed::$details" | |
| exit 1 | |
| } |