Skip to content
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
11 changes: 11 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Compiled output
**/dist/
**/lib/
**/node_modules/

# Build files
**/.eslintrc.js
**/esbuild.js

# Other generated files
**/*.map
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
module.exports = {
root: true,
extends: '@eclipse-glsp',
ignorePatterns: ['**/{node_modules,lib}', '**/.eslintrc.js'],

parserOptions: {
tsconfigRootDir: __dirname,
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
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
timeout-minutes: 60
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 20.x
- name: Build
run: yarn install
- name: Bundle browser example
working-directory: examples/workflow-server
run: yarn bundle:browser
- 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
test:
name: Test
timeout-minutes: 60
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 20.x
- name: Install
run: |
yarn install
- name: Test
run: |
yarn test:ci
- name: Publish Test Report
uses: ctrf-io/github-test-reporter@646f98cfc16c6f7a0e1f6100cabe2deb95dd2eef # v1.0.22
with:
report-path: 'packages/*/ctrf/*.json'
summary-report: true
file-report: true
if: always()
lint:
name: Lint
timeout-minutes: 60
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 20.x
- name: Install
run: |
yarn install
- name: Create eslint json report
run: |
yarn lint:ci
- 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
coverage:
name: Coverage
timeout-minutes: 60
runs-on: ubuntu-22.04
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 20.x
- name: Install
run: |
yarn install
- name: Run Coverage Tests
run: |
yarn test:coverage:ci
- name: Upload Coverage Report
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: coverage-report
path: coverage/
if: always()
16 changes: 6 additions & 10 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,9 @@
name: 'CodeQL'

on:
push:
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
workflow_dispatch:
schedule:
- cron: '39 12 * * 6'
- cron: '39 12 * * 6' # Every Saturday at 12:39 UTC

jobs:
analyze:
Expand All @@ -38,11 +34,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@16df4fbc19aea13d921737861d6c622bf3cefe23 # v2.23.0
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -53,7 +49,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@16df4fbc19aea13d921737861d6c622bf3cefe23 # v2.23.0

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -67,4 +63,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@16df4fbc19aea13d921737861d6c622bf3cefe23 # v2.23.0
38 changes: 38 additions & 0 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Prepare Release

on:
workflow_dispatch:
inputs:
release_type:
description: 'Release type (major, minor, patch, next, or custom)'
required: true
type: choice
options:
- major
- minor
- patch
- next
- custom
custom_version:
description: 'Custom version (required if release_type is custom)'
required: false
type: string
branch:
description: 'Branch to use for the release repo (default: default branch)'
required: false
type: string
draft:
description: 'Create PR as draft'
required: false
type: boolean
default: false

jobs:
prepare-release:
uses: eclipse-glsp/glsp/.github/workflows/prepare-release.yml@master
with:
release_type: ${{ inputs.release_type }}
custom_version: ${{ inputs.custom_version }}
release_repo: glsp-server-node
branch: ${{ inputs.branch }}
draft: ${{ inputs.draft }}
48 changes: 48 additions & 0 deletions .github/workflows/publish-next.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: 'Publish next'
on:
workflow_run:
workflows: ['CI']
types:
- completed
branches: [main]
workflow_dispatch:

permissions:
id-token: write
jobs:
build:
name: Build & Release
runs-on: ubuntu-22.04
if: github.event_name == 'workflow_dispatch' || (github.event.workflow_run.conclusion == 'success')
env:
changes: true
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
# To fetch all history for all branches and tags.
# Required for lerna to determine the version of the next package.
fetch-depth: 0
ref: ${{ github.event.workflow_run.head_commit.id || github.sha }}
- name: Check for changes in "packages" or "examples" directory
id: check_changes
run: |
if git diff --name-only HEAD^ HEAD | grep -qE '^(packages|examples)'; then
echo "changes=true" >> $GITHUB_ENV
else
echo "changes=false" >> $GITHUB_ENV
fi
if: github.event_name == 'workflow_run'
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
if: env.changes == 'true'
- name: Build
run: yarn
if: env.changes == 'true'
- name: Publish NPM
run: yarn publish:next
env:
NPM_CONFIG_PROVENANCE: 'true'
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
if: env.changes == 'true'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ yarn-error.log
tsconfig.tsbuildinfo
eslint.xml
report.xml
**/ctrf

wf-glsp-server-node.js
wf-glsp-server-node.js.map
Expand Down
17 changes: 17 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Dependencies
node_modules/

# Build outputs
lib/
dist/

# Generated files
*.min.js
*.min.css

# Lock files
package-lock.json
yarn.lock

# Logs
*.log
Loading