Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
tortmayr committed Mar 3, 2024
1 parent 0e48491 commit 818c6f0
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 3 deletions.
64 changes: 62 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,18 @@ on:
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_and_lint:
build:
name: Build
runs-on: ubuntu-latest
steps:
Expand All @@ -32,4 +41,55 @@ jobs:
- name: Annotate Code Linting Results
uses: ataylorme/[email protected]
with:
report-json: "eslint_report.json"
report-json: "eslint_report.json"

playwright-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with :
path: 'glsp-playwright'
- 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 & apps
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
cd ../glsp-client
yarn
- 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/
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"clean": "lerna run clean",
"lint": "yarn eslint . --ext .ts,.tsx",
"lint:ci": "yarn lint --output-file eslint_report.json -f json",
"prepare": "yarn build",
"prepare": "lerna run prepare && yarn build",
"publish:latest": "lerna publish from-git --no-git-reset --no-git-tag-version --no-verify-access --no-push",
"publish:next": "SHA=$(git rev-parse --short HEAD) && lerna publish preminor --exact --canary --preid next.${SHA} --dist-tag next --no-git-reset --no-git-tag-version --no-push --ignore-scripts --yes --no-verify-access",
"publish:prepare": "lerna version --ignore-scripts --yes --no-push",
Expand Down

0 comments on commit 818c6f0

Please sign in to comment.