test #5
This file contains 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: | |
- testci | |
pull_request: | |
branches: | |
- testci | |
workflow_dispatch: | |
inputs: | |
glspClientRef: | |
description: 'GLSP Client branch/commit/tag to checkout' | |
required: true | |
default: 'master' | |
nodeServerRef: | |
description: 'GLSP node server branch/commit/tag to checkout' | |
required: true | |
default: 'main' | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
- name: Install dependencies | |
run: yarn install | |
- name: Check for uncommitted changes in yarn.lock | |
run: | | |
if git diff --name-only | grep -q "^yarn.lock"; then | |
echo "::error::The yarn.lock file has uncommitted changes!" | |
exit 1 | |
fi | |
- name: ESLint Check | |
run: yarn lint:ci | |
continue-on-error: true | |
- name: Annotate Code Linting Results | |
uses: ataylorme/[email protected] | |
with: | |
report-json: "eslint_report.json" | |
playwright-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
with: | |
repository: 'eclipse-glsp/glsp-client' | |
ref: ${{ github.event.inputs.glspClientRef }} | |
path: 'glsp-client' | |
- uses: actions/checkout@v4 | |
with: | |
repository: 'eclipse-glsp/glsp-server-node' | |
ref: ${{ github.event.inputs.nodeServerRef }} | |
path: 'glsp-server-node' | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- name: Start workflow server | |
run: | | |
cd glsp-server-node | |
yarn | |
nohup yarn start:websocket > server.log 2>&1 & | |
while ! nc -z localhost 8081; do | |
sleep 1 # wait for 1 second before check again | |
done | |
- name: Run Playwright tests | |
run: | | |
cd glsp-playwright | |
yarn | |
yarn test:standalone | |
env: | |
CI: true | |
MULTI_BROWSER: true | |
GLSP_SERVER_PORT: '8081' | |
GLSP_SERVER_DEBUG: true | |
GLSP_WEBSOCKET_PATH: workflow | |
GLSP_SERVER_PLAYWRIGHT_MANAGED: false | |
STANDALONE_URL: 'file://${{ github.workspace }}/glsp-client/examples/workflow-standalone/app/diagram.html' | |
THEIA_URL: 'http://localhost:3000' | |
VSCODE_VSIX_ID: 'eclipse-glsp.workflow-vscode-example' | |
VSCODE_VSIX_PATH: '${{ github.workspace }}/glsp-vscode-integration/example/workflow/extension/workflow-vscode-example-2.2.0-next.vsix' | |
- name: Upload Playwright report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: playwright-report | |
path: glsp-playwright/examples/workflow-test/playwright-report/ |