Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLSP-1287: Add CI job for E2E tests #229

Merged
merged 1 commit into from
Jul 23, 2024
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
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: CI

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
Expand All @@ -10,6 +13,7 @@ on:
jobs:
build:
name: Build & Test
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
Expand Down Expand Up @@ -39,6 +43,7 @@ jobs:
NODE_OPTIONS: --max_old_space_size=4096
lint:
name: Lint
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
Expand All @@ -55,9 +60,8 @@ jobs:
- name: Create eslint json report
run: |
yarn lint:ci
continue-on-error: true
- name: Create summary
if: always()
run: |
npm_config_yes=true npx github:10up/eslint-json-to-md#82ff16b --path ./eslint_report.json --output ./eslint_report.md
cat eslint_report.md >> $GITHUB_STEP_SUMMARY
if: always()
67 changes: 67 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: 'E2E'

concurrency:
group: e2e-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
playwright:
name: E2E Tests
timeout-minutes: 120
runs-on: ubuntu-latest
env:
STANDALONE_URL: 'file://${{ github.workspace }}/glsp-client/examples/workflow-standalone/app/diagram.html'
GLSP_SERVER_PORT: '8081'
GLSP_SERVER_PLAYWRIGHT_MANAGED: 'false'
GLSP_WEBSOCKET_PATH: 'workflow'
THEIA_URL: 'http://localhost:3000'
VSCODE_VSIX_ID: 'eclipse-glsp.workflow-vscode-example'
VSCODE_VSIX_PATH: '${{ github.workspace }}/.../vscode-example-2.3.0-next.vsix'
GLSP_SERVER_DEBUG: 'true'

steps:
- uses: actions/[email protected]
with:
path: 'theia-integration'
- uses: actions/[email protected]
with:
repository: 'eclipse-glsp/glsp-playwright'
path: 'glsp-playwright'
- uses: actions/[email protected]
with:
node-version: '18'
- uses: actions/[email protected]
with:
python-version: '3.11'
- name: Build Theia Integration
run: |
cd theia-integration
yarn --skip-integrity-check --network-timeout 100000
yarn browser build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build Playwright
run: |
cd glsp-playwright
yarn
- name: Start Browser App
run: |
cd theia-integration
yarn browser start &
- name: Run Playwright tests
id: run_playwright_tests
run: |
cd glsp-playwright
yarn test:theia
- name: Upload Playwright report
uses: actions/[email protected]
if: always()
with:
name: playwright-report
path: glsp-playwright/examples/workflow-test/playwright-report/
5 changes: 0 additions & 5 deletions .github/workflows/multi-os-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,22 @@ jobs:

steps:
- uses: actions/[email protected]

- name: Set up Node.js ${{ matrix.node }} on ${{ matrix.os }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node }}

- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.11'

- name: Install dependencies and build
run: yarn --skip-integrity-check --network-timeout 100000
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9

- name: Build electron
run: yarn electron build
env:
NODE_OPTIONS: --max_old_space_size=4096

- name: Build browser
run: yarn browser build
env:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
workflows: ['CI']
types:
- completed
branches: [master]
workflow_dispatch:

permissions:
Expand All @@ -12,7 +13,7 @@ jobs:
build:
name: Build & Release
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'master')
if: github.event_name == 'workflow_dispatch' || (github.event.workflow_run.conclusion == 'success')
env:
changes: true
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/theia-compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Theia Compatibility

on:
workflow_dispatch:
pull_request:
push:
branches: [master]
schedule:
- cron: '0 8 * * 1' # Every Monday at 8 AM UTC
Expand Down