-
Notifications
You must be signed in to change notification settings - Fork 3
130 lines (127 loc) · 4.1 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: 'CI'
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
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
lint:
name: Lint
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version: 18.x
- name: Install
run: |
yarn install --ignore-scripts
yarn compile
- name: Create eslint json report
run: |
yarn lint:ci
continue-on-error: true
- name: Create summary
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
playwright-node:
name: Playwright Tests (Node server)
timeout-minutes: 120
runs-on: ubuntu-latest
env:
THEIA_URL: 'http://localhost:3000'
VSCODE_VSIX_ID: 'eclipse-glsp.workflow-vscode-example'
GLSP_SERVER_DEBUG: 'true'
GLSP_SERVER_PORT: '8081'
GLSP_SERVER_PLAYWRIGHT_MANAGED: 'true'
GLSP_WEBSOCKET_PATH: 'workflow'
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version: '18'
- name: Install dependencies
run: yarn install
- name: Prepare repos
run: yarn repo prepare --protocol https
- name: Set Environment Variables
run: |
echo "STANDALONE_URL=$(yarn -s repo client url)" >> $GITHUB_ENV
echo "VSCODE_VSIX_PATH=$(yarn -s repo vscode-integration vsixPath)" >> $GITHUB_ENV
echo "GLSP_SERVER_START_COMMAND=yarn repo node-server start" >> $GITHUB_ENV
- name: Start theia
run: yarn repo theia-integration start &
- name: Run Playwright tests
id: run_playwright_tests
run: xvfb-run -a yarn test
- name: Upload Playwright report
if: ${{ always() }}
uses: actions/[email protected]
with:
name: playwright-report-node
path: examples/workflow-test/playwright-report/
playwright-java:
if: false
name: Playwright Tests (Java server)
timeout-minutes: 120
runs-on: ubuntu-latest
env:
THEIA_URL: 'http://localhost:3000'
VSCODE_VSIX_ID: 'eclipse-glsp.workflow-vscode-example'
GLSP_SERVER_DEBUG: 'true'
GLSP_SERVER_PORT: '8081'
GLSP_SERVER_PLAYWRIGHT_MANAGED: 'true'
GLSP_WEBSOCKET_PATH: 'workflow'
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version: '18'
- name: Set up JDK
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: '17'
- name: Install dependencies
run: yarn install
- name: Prepare repos
run: yarn repo prepare --protocol https --serverType java
- name: Set Environment Variables
run: |
echo "STANDALONE_URL=$(yarn -s repo client url)" >> $GITHUB_ENV
echo "VSCODE_VSIX_PATH=$(yarn -s repo vscode-integration vsixPath)" >> $GITHUB_ENV
echo "GLSP_SERVER_START_COMMAND=yarn repo java-server start" >> $GITHUB_ENV
- name: Start theia
run: yarn repo theia-integration start &
- name: Run Playwright tests
id: run_playwright_tests
run: xvfb-run -a yarn test
- name: Upload Playwright report
if: ${{ always() }}
uses: actions/[email protected]
with:
name: playwright-report-java
path: examples/workflow-test/playwright-report/