Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,25 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
container:
image: mcr.microsoft.com/playwright:v1.57.0-jammy
image: mcr.microsoft.com/playwright:v1.62.1-jammy
env:
MPKIT_EMAIL: ${{ secrets.MPKIT_EMAIL }}
MPKIT_TOKEN: ${{ secrets.MPKIT_TOKEN }}
MPKIT_URL: ${{ secrets.MPKIT_URL }}
CI: true
steps:
- name: Checkout test instance code
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
repository: Platform-OS/pos-cli-gui-qa
path: instance
- name: Checkout pos-cli code
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
path: pos-cli
- uses: actions/setup-node@v4
- uses: actions/setup-node@v7
with:
node-version: 20
node-version: 22
- name: Install pos-cli
run: |
npm install -g @platformos/pos-cli
Expand All @@ -69,10 +69,22 @@ jobs:
shell: sh
run: |
set -eu
pos-cli gui serve &
# --host 127.0.0.1, not the default name "localhost": the container resolves localhost
# to ::1 first, so express bound IPv6-only while node's fetch resolved the same name to
# 127.0.0.1 and got ECONNREFUSED. undici does not fall back to the other family, so the
# two ends have to agree on a literal address rather than both trusting the resolver.
pos-cli gui serve --host 127.0.0.1 &
npm run preview &
sleep 5 && npx playwright test
- uses: actions/upload-artifact@v4
# Wait for the API server to answer instead of assuming 5s is enough. node, not curl:
# setup-node guarantees it, and this is the exact client the tests use.
for _ in $(seq 1 60); do
if node -e "fetch('http://127.0.0.1:3333/info').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))"; then
break
fi
sleep 1
done
npx playwright test
- uses: actions/upload-artifact@v7
if: always()
with:
name: test-results
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7

- uses: actions/setup-node@v4
- uses: actions/setup-node@v7
with:
node-version: ${{ matrix.version }}

Expand Down
3 changes: 2 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,8 @@ expect(stderr).toMatch(/Could not connect|Request to( the)? server failed/);

## Node.js Version

- **Minimum**: Node.js 22
- **Minimum**: Node.js 22.13.0 — set by the dependencies, not by our own code: `commander` 15 needs
>=22.12.0 (it is ESM-only and relies on `require(esm)`) and `inquirer` 14 needs ^22.13.0.
- **Recommended**: Node.js 22+
- **Tested on**: 22, 24
- Check enforced by `scripts/check-node-version.js` postinstall hook
4 changes: 2 additions & 2 deletions bin/pos-cli-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ program
inquirer
.prompt([
{
type: 'list',
type: 'select',
name: 'repo',
message: 'Example app',
default: 'empty',
choices: Object.keys(repos)
},
{
type: 'string',
type: 'input',
name: 'branch',
message: 'Branch',
default: 'master'
Expand Down
Loading
Loading