This repository was archived by the owner on Apr 8, 2026. It is now read-only.
Update compliance docs: Article 86 explain(), on_event_async, monitoring #15
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: Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| node-version: ['18', '20'] | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=2048 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Run tests | |
| run: npx jest --no-coverage --testPathIgnorePatterns='indentation-scanner' | |
| if: runner.os == 'Windows' | |
| - name: Run tests | |
| run: npx jest --no-coverage | |
| if: runner.os != 'Windows' | |
| mcp-smoke: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Create test directory | |
| run: | | |
| mkdir smoke-test | |
| cd smoke-test | |
| npm init -y | |
| shell: bash | |
| - name: Install from npm (simulates real user) | |
| run: | | |
| cd smoke-test | |
| npm install flowscript-core | |
| shell: bash | |
| - name: Verify import | |
| run: | | |
| cd smoke-test | |
| node -e "const { Memory } = require('flowscript-core'); const m = new Memory(); console.log('Import OK, size:', m.size);" | |
| shell: bash | |
| - name: MCP server stdio handshake | |
| run: | | |
| cd smoke-test | |
| node -e " | |
| const { spawn } = require('child_process'); | |
| const path = require('path'); | |
| const mcp = path.join('node_modules', 'flowscript-core', 'bin', 'flowscript-mcp'); | |
| const proc = spawn(process.execPath, [mcp, './test-memory.json'], { stdio: ['pipe', 'pipe', 'pipe'] }); | |
| let output = ''; | |
| proc.stdout.on('data', d => output += d); | |
| setTimeout(() => { | |
| proc.stdin.write(JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'initialize', params: { protocolVersion: '2025-03-26', capabilities: {}, clientInfo: { name: 'ci', version: '1' } } }) + '\n'); | |
| setTimeout(() => { | |
| const lines = output.trim().split('\n').filter(Boolean); | |
| if (!lines.length) { console.error('No response'); process.exit(1); } | |
| const data = JSON.parse(lines[lines.length - 1]); | |
| if (!data.result) { console.error('Bad response:', JSON.stringify(data)); process.exit(1); } | |
| const info = data.result.serverInfo || {}; | |
| console.log('MCP OK:', info.name, 'v' + info.version, '| Platform:', process.platform, '| Node:', process.version); | |
| proc.kill(); | |
| console.log('PASS'); | |
| }, 2000); | |
| }, 1000); | |
| " | |
| shell: bash |