Skip to content

Commit b885ce2

Browse files
committed
GLSP-1320: Update dev config
- Updates to latest version of @eclipse-glsp/dev - Add generate:index utility script - Regenerate index files - Fix codeActionsOnSave in vscode settings - Refactor upgrade:next script - Reformat code base with prettier - Fix copyright headers (by running a full check with glsp checkHeaders . -t full) - Add resolutions for snabbdom to fix eclipse-sprotty/sprotty#429 Can be removed once eclipse-glsp/glsp#1253 is resolved - Switch from lerna to lerna-lite - Remove Jenkinsfile and migrate to github-actions CI workflows - Add CI workflow for PRs - Add publish next workflow for pushes on master - Add multi-platform workflow that can be executed manually runs periodically (once per week) - Adapt code-analysis workflow to only run periodically (once a week) instead of on each PR Part of eclipse-glsp/glsp#1320 Fixes eclipse-glsp/glsp#1286
1 parent 43b1470 commit b885ce2

File tree

55 files changed

+3084
-3132
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+3084
-3132
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ to learn how to report vulnerabilities.
2525

2626
<!-- Please check, when if it applies to your change. -->
2727

28-
- [ ] This PR should be mentioned in the changelog
29-
- [ ] This PR introduces a breaking change (if yes, provide more details below for the changelog and the migration guide)
28+
- [ ] This PR should be mentioned in the changelog
29+
- [ ] This PR introduces a breaking change (if yes, provide more details below for the changelog and the migration guide)

.github/workflows/ci.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
name: Build & Test
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 60
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 18.x
21+
- name: Build
22+
run: yarn
23+
- name: Check for uncommitted changes in yarn.lock
24+
run: |
25+
if git diff --name-only | grep -q "^yarn.lock"; then
26+
echo "::error::The yarn.lock file has uncommitted changes!"
27+
exit 1
28+
fi
29+
- name: Tests (Mocha)
30+
run: yarn test:ci
31+
- name: Create test report
32+
uses: dorny/[email protected]
33+
with:
34+
name: Mocha Report
35+
path: ./packages/*/report.xml
36+
list-tests: 'failed'
37+
list-suites: 'failed'
38+
reporter: java-junit
39+
# Only execute for push on master or PRs in the main repository (Annotations don't work in forks due to security reasons)
40+
if: always() && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == 'eclipse-glsp/glsp-client')
41+
- name: Create summary
42+
uses: test-summary/[email protected]
43+
with:
44+
paths: ./packages/*/report.xml
45+
if: always()
46+
47+
lint:
48+
name: Lint
49+
runs-on: ubuntu-latest
50+
timeout-minutes: 60
51+
steps:
52+
- uses: actions/checkout@v4
53+
- uses: actions/setup-node@v4
54+
with:
55+
node-version: 18.x
56+
- name: Install
57+
run: |
58+
yarn install --ignore-scripts
59+
yarn compile
60+
- name: Create eslint json report
61+
run: |
62+
yarn lint:ci
63+
- name: Annotate Code Linting Results
64+
uses: ataylorme/eslint-annotate-action@v3
65+
with:
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
report-json: 'eslint_report.json'
68+
check-name: 'ESLint Report'
69+
# Only execute for push on master or PRs in the main repository (Annotations don't work in forks due to security reasons)
70+
if: always() && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == 'eclipse-glsp/glsp-client')
71+
- name: Create summary
72+
run: |
73+
npm_config_yes=true npx github:10up/eslint-json-to-md#82ff16b --path ./eslint_report.json --output ./eslint_report.md
74+
cat eslint_report.md >> $GITHUB_STEP_SUMMARY
75+
if: always()

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
name: 'CodeQL'
1313

1414
on:
15-
push:
16-
branches: [master]
17-
pull_request:
18-
# The branches below must be a subset of the branches above
19-
branches: [master]
2015
schedule:
2116
- cron: '26 0 * * 4'
2217

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Multi-platform Build & Test
2+
on:
3+
push:
4+
branches:
5+
- glsp-1320
6+
workflow_dispatch:
7+
schedule:
8+
- cron: '26 0 * * 5'
9+
10+
jobs:
11+
build:
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, windows-latest, macos-latest]
16+
node-version: [16.x, 18.x, 20.x]
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
- name: Build
25+
run: yarn
26+
- name: Lint
27+
run: yarn lint
28+
- name: Test
29+
run: yarn test

.github/workflows/publish-next.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: 'Publish `next` version'
2+
on:
3+
push:
4+
branches:
5+
- master
6+
paths:
7+
- 'packages/**'
8+
- 'examples/**'
9+
10+
permissions:
11+
id-token: write
12+
contents: read
13+
actions: read
14+
checks: write
15+
16+
jobs:
17+
publish:
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 60
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
# To fetch all history for all branches and tags.
25+
# Required for lerna to determine the version of the next package.
26+
fetch-depth: 0
27+
- uses: actions/setup-node@v4
28+
with:
29+
node-version: 18.x
30+
- name: Build
31+
run: yarn
32+
- name: Create test coverage report
33+
run: yarn test:coverage:ci
34+
- name: Upload test coverage report
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: test-coverage-report
38+
path: ./coverage
39+
retention-days: 30
40+
if: always()
41+
- name: Publish NPM
42+
run: yarn publish:next
43+
env:
44+
NPM_CONFIG_PROVENANCE: 'true'
45+
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ examples/workflow-standalone/app
1414

1515
!packages/client/src/lib
1616
tsconfig.tsbuildinfo
17-
eslint.xml
17+
eslint_report.json
1818
report.xml
1919

2020
examples/workflow-standalone/server

.mocharc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
{
22
"$schema": "https://json.schemastore.org/mocharc",
3-
"extends": "@eclipse-glsp/mocha-config",
4-
"require": [
5-
"ts-node/register",
6-
"tsconfig-paths/register",
7-
"reflect-metadata/Reflect",
8-
"ignore-styles"
9-
]
3+
"extends": "@eclipse-glsp/mocha-config"
4+
105
}

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
{
77
"editor.formatOnSave": true,
88
"editor.codeActionsOnSave": {
9-
"source.fixAll.eslint": "explicit",
10-
"source.organizeImports": "explicit"
9+
"source.fixAll.eslint": "always",
10+
"source.organizeImports": "always"
1111
},
1212
"eslint.validate": ["javascript", "typescript"],
1313
"search.exclude": {

Jenkinsfile

Lines changed: 0 additions & 188 deletions
This file was deleted.

0 commit comments

Comments
 (0)