deploy: current vibn theia state
Made-with: Cursor
This commit is contained in:
97
.github/workflows/check-new-package.yml
vendored
Normal file
97
.github/workflows/check-new-package.yml
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
name: Check New Theia Package
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
types: [opened, synchronized, reopened]
|
||||
paths:
|
||||
- 'packages/*/package.json'
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
detect-new-packages:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Detect if a new package was added
|
||||
id: detect
|
||||
run: |
|
||||
git fetch origin ${{ github.base_ref }}
|
||||
NEW_PACKAGES=$(git diff --name-only --diff-filter=A origin/${{ github.base_ref }}...HEAD | grep -E '^packages/[^/]+/package\.json$' || true)
|
||||
|
||||
if [ -z "$NEW_PACKAGES" ]; then
|
||||
echo "new_package_found=false" >> $GITHUB_OUTPUT
|
||||
echo "No new packages detected"
|
||||
else
|
||||
echo "new_package_found=true" >> $GITHUB_OUTPUT
|
||||
PACKAGE_NAMES=$(echo "$NEW_PACKAGES" | sed 's|packages/\([^/]*\)/package\.json|\1|' | tr '\n' ',' | sed 's/,$//')
|
||||
echo "package_names=$PACKAGE_NAMES" >> $GITHUB_OUTPUT
|
||||
echo "New packages detected: $PACKAGE_NAMES"
|
||||
fi
|
||||
|
||||
- name: Post or update checklist comment
|
||||
if: steps.detect.outputs.new_package_found == 'true'
|
||||
uses: actions/github-script@ffc2c79a5b2490bd33e0a41c1de74b877714d736 # v3.2.0
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const packageNames = '${{ steps.detect.outputs.package_names }}';
|
||||
const packageList = packageNames.split(',').map(name => `\`${name}\``).join(', ');
|
||||
|
||||
const commentBody = `
|
||||
### New \`@theia\` Package(s) Detected
|
||||
|
||||
This PR adds the following new package(s): ${packageList}
|
||||
|
||||
Please ensure the following checklist items are completed before merging:
|
||||
|
||||
- [ ] \`package.json\` contains all required fields (name, version, description, license, etc.) and scripts
|
||||
- [ ] \`README.md\` was added (please align with the existing README structure, e.g. [README.md](https://github.com/eclipse-theia/theia/blob/master/packages/editor/README.md))
|
||||
- [ ] Config files (\`tsconfig.json\`, \`.eslintrc.js\`) were added and align with the existing packages
|
||||
- [ ] Folder structure follows Theia conventions (see [Code Organization](https://github.com/eclipse-theia/theia/blob/master/doc/code-organization.md))
|
||||
- [ ] Package is added to the example applications (i.e. \`browser\`, \`browser-only\`, \`electron\`)
|
||||
- [ ] New packages must be published manually by a Theia committer initially (see also [Release Process - Newly added Theia packages](https://github.com/eclipse-theia/theia/blob/master/doc/Publishing.md#212-newly-added-theia-packages---publish-initially-to-npm)).
|
||||
If you are not a committer or do not have enough time, please open a follow-up ticket with the label \`toDoWithRelease\` to inform the release team about the new package (see for example: <https://github.com/eclipse-theia/theia/issues/16651>).
|
||||
- [ ] If the package should also be part of the Theia IDE, please [open a ticket for the Theia IDE](https://github.com/eclipse-theia/theia-ide/issues/new?template=feature_request.md)
|
||||
and assign the \`toDoWithRelease\` (see for example: <https://github.com/eclipse-theia/theia-ide/issues/615>)
|
||||
`;
|
||||
|
||||
const issue_number = context.issue.number;
|
||||
const owner = context.repo.owner;
|
||||
const repo = context.repo.repo;
|
||||
|
||||
const comments = await github.issues.listComments({
|
||||
owner,
|
||||
repo,
|
||||
issue_number
|
||||
});
|
||||
|
||||
const botComment = comments.data.find(comment =>
|
||||
comment.user.type === 'Bot' &&
|
||||
comment.body.includes('New `@theia` Package(s) Detected')
|
||||
);
|
||||
|
||||
if (botComment) {
|
||||
await github.issues.updateComment({
|
||||
owner,
|
||||
repo,
|
||||
comment_id: botComment.id,
|
||||
body: commentBody
|
||||
});
|
||||
console.log('Updated existing comment');
|
||||
} else {
|
||||
await github.issues.createComment({
|
||||
owner,
|
||||
repo,
|
||||
issue_number,
|
||||
body: commentBody
|
||||
});
|
||||
console.log('Created new comment');
|
||||
}
|
||||
113
.github/workflows/ci-cd.yml
vendored
Normal file
113
.github/workflows/ci-cd.yml
vendored
Normal file
@@ -0,0 +1,113 @@
|
||||
name: CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- 'doc/**'
|
||||
- 'logo/**'
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- 'doc/**'
|
||||
- 'logo/**'
|
||||
|
||||
jobs:
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 60
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
|
||||
- name: Use Node.js 22.x
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
||||
with:
|
||||
node-version: 22.x
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: Use Python 3.13
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: '3.13'
|
||||
|
||||
- name: Install and Build
|
||||
shell: bash
|
||||
run: |
|
||||
npm ci
|
||||
./scripts/check_git_status.sh
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
npm run lint
|
||||
|
||||
build:
|
||||
name: Build and Test (${{ matrix.os }}, node-${{ matrix.node }})
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-2022, ubuntu-22.04, macos-14]
|
||||
node: [20.x, 22.x]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 60
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
|
||||
- name: Use Node.js ${{ matrix.node }}
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: Use Python 3.13
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: '3.13'
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
git status
|
||||
./scripts/check_git_status.sh
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
|
||||
|
||||
- name: Download Plugins
|
||||
shell: bash
|
||||
run: |
|
||||
npm run download:plugins -- --rate-limit 3
|
||||
|
||||
- name: Test (headless)
|
||||
if: matrix.tests != 'skip'
|
||||
shell: bash
|
||||
run: |
|
||||
npm run rebuild:browser
|
||||
npm run test:theia
|
||||
|
||||
- name: Test (browser)
|
||||
if: matrix.tests != 'skip' && matrix.node == '20.x'
|
||||
run: |
|
||||
npm run test:browser
|
||||
|
||||
- name: Test (electron)
|
||||
if: matrix.tests != 'skip' && runner.os == 'Linux'
|
||||
run: |
|
||||
xvfb-run -a npm run test:electron
|
||||
46
.github/workflows/discussion-welcome.yml
vendored
Normal file
46
.github/workflows/discussion-welcome.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Welcome Discussion
|
||||
|
||||
on:
|
||||
discussion:
|
||||
types: [created]
|
||||
|
||||
permissions:
|
||||
discussions: write
|
||||
|
||||
jobs:
|
||||
welcome:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Add welcome comment
|
||||
uses: actions/github-script@e69ef5462fd455e02edcaf4dd7708eda96b9eda0 # v7
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const discussion = context.payload.discussion;
|
||||
const author = discussion.user.login;
|
||||
|
||||
const message = [
|
||||
`Hi @${author}, thanks for starting this discussion! 👋`,
|
||||
'',
|
||||
'The Theia community will take a look soon. In the meantime, you might find helpful information in:',
|
||||
'- 📖 [Theia Documentation](https://theia-ide.org/docs/)',
|
||||
'- ❓ [FAQ](https://theia-ide.org/docs/faq/)',
|
||||
'- 💬 [Previous Discussions](https://github.com/eclipse-theia/theia/discussions)',
|
||||
'',
|
||||
'---',
|
||||
'',
|
||||
'💙 Eclipse Theia is built and maintained by a community of contributors and sponsors. ' +
|
||||
'If Theia is valuable to your work, consider [sponsoring the project](https://theia-ide.org/support/). ' +
|
||||
'For professional support, training, or consulting services, [learn more about available options](https://theia-ide.org/support/).'
|
||||
].join('\n');
|
||||
|
||||
await github.graphql(`
|
||||
mutation($discussionId: ID!, $body: String!) {
|
||||
addDiscussionComment(input: {discussionId: $discussionId, body: $body}) {
|
||||
clientMutationId
|
||||
}
|
||||
}
|
||||
`, {
|
||||
discussionId: discussion.node_id,
|
||||
body: message
|
||||
});
|
||||
77
.github/workflows/generate-sbom.yml
vendored
Normal file
77
.github/workflows/generate-sbom.yml
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
name: Generate NPM SBOM
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Version"
|
||||
default: "master"
|
||||
required: true
|
||||
|
||||
env:
|
||||
NODE_VERSION: "20.x"
|
||||
REGISTRY_URL: "https://registry.npmjs.org"
|
||||
PRODUCT_PATH: "./"
|
||||
CDXGEN_VERSION: "11.7.0"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
generate-sbom:
|
||||
name: Generate SBOM
|
||||
runs-on: ubuntu-22.04
|
||||
outputs:
|
||||
project-version: ${{ steps.version.outputs.PROJECT_VERSION }}
|
||||
permissions:
|
||||
packages: read
|
||||
|
||||
steps:
|
||||
- name: Extract version
|
||||
id: version
|
||||
run: |
|
||||
VERSION="${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.version }}"
|
||||
echo "PROJECT_VERSION=$VERSION" >> $GITHUB_OUTPUT
|
||||
echo "Product version: $VERSION"
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ steps.version.outputs.PROJECT_VERSION }}
|
||||
|
||||
- name: Setup Node SDK
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
registry-url: ${{ env.REGISTRY_URL }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
npm ci
|
||||
|
||||
- name: Install cdxgen
|
||||
run: |
|
||||
npm install -g @cyclonedx/cdxgen@${{ env.CDXGEN_VERSION }}
|
||||
|
||||
- name: Generate SBOM
|
||||
run: |
|
||||
cdxgen -r -o ${{ env.PRODUCT_PATH }}bom.json
|
||||
|
||||
- name: Upload SBOM as artifact
|
||||
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
|
||||
with:
|
||||
name: sbom
|
||||
path: ${{ env.PRODUCT_PATH }}/bom.json
|
||||
|
||||
store-sbom-data: # stores sbom and metadata in a predefined format for otterdog to pick up
|
||||
needs: ["generate-sbom"]
|
||||
uses: eclipse-csi/workflows/.github/workflows/store-sbom-data.yml@main
|
||||
with:
|
||||
projectName: "theia"
|
||||
projectVersion: ${{ needs.generate-sbom.outputs.project-version }}
|
||||
bomArtifact: "sbom"
|
||||
bomFilename: "bom.json"
|
||||
parentProject: "2b55dbe6-7a7e-4659-a803-babf4138e03f"
|
||||
54
.github/workflows/license-check.yml
vendored
Normal file
54
.github/workflows/license-check.yml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
name: 3PP License Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'package-lock.json'
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'package-lock.json'
|
||||
schedule:
|
||||
- cron: '0 4 * * *' # Runs every day at 4am: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule
|
||||
|
||||
jobs:
|
||||
License-check:
|
||||
name: 3PP License Check
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-22.04]
|
||||
node: ['22.x']
|
||||
java: ['11']
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 60
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Use Node.js ${{ matrix.node }}
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: Use Java ${{ matrix.java }}
|
||||
uses: actions/setup-java@1df8dbefe2a8cbc99770194893dd902763bee34b # v3.9.0
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: ${{ matrix.java }}
|
||||
|
||||
- name: Run dash-licenses check
|
||||
shell: bash
|
||||
run: |
|
||||
npm ci
|
||||
npm run license:check
|
||||
50
.github/workflows/native-dependencies.yml
vendored
Normal file
50
.github/workflows/native-dependencies.yml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
name: Package Native Dependencies
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: ["ubuntu-22.04", "windows-latest", "macos-latest"]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
|
||||
# Update the node version here after every Electron upgrade
|
||||
- name: Use Node.js v22.20.0
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
||||
with:
|
||||
node-version: "22.20.0"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
|
||||
- name: Use Python 3.13
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install and Build
|
||||
shell: bash
|
||||
run: |
|
||||
npm ci
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
|
||||
|
||||
- name: Build Browser App
|
||||
shell: bash
|
||||
run: |
|
||||
npm run build:browser
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
|
||||
- name: Zip Native Dependencies
|
||||
shell: bash
|
||||
run: npm run zip:native:dependencies
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 #v4
|
||||
with:
|
||||
name: native-dependencies-${{ matrix.os }}
|
||||
path: ./scripts/native-dependencies-*.zip
|
||||
58
.github/workflows/performance-tests.yml
vendored
Normal file
58
.github/workflows/performance-tests.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
name: Performance Tests
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-test-performance:
|
||||
name: Performance Tests
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 30
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
|
||||
- name: Use Node.js 22.x
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
||||
with:
|
||||
node-version: "22.x"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
|
||||
- name: Use Python 3.13
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: '3.13'
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
npm install -g node-gyp
|
||||
npm ci
|
||||
npm run build
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
|
||||
|
||||
- name: Performance (browser)
|
||||
shell: bash
|
||||
run: npm run performance:startup:browser
|
||||
|
||||
- name: Performance (Electron)
|
||||
shell: bash
|
||||
run: xvfb-run npm run performance:startup:electron
|
||||
|
||||
- name: Analyze performance results
|
||||
uses: benchmark-action/github-action-benchmark@fd31771ce86cc65eab85653da103f71ab1b4479c # v1.9.0
|
||||
with:
|
||||
name: Performance Benchmarks
|
||||
tool: "customSmallerIsBetter"
|
||||
output-file-path: performance-result.json
|
||||
alert-threshold: "150%"
|
||||
fail-on-alert: false
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }} # Needed for comments an GH Pages
|
||||
benchmark-data-dir-path: tests/performance
|
||||
auto-push: true # Push to GH Pages
|
||||
comment-on-alert: true # Comment on commit if it causes a performance regression
|
||||
max-items-in-chart: 100 # Don't just collect results forever
|
||||
77
.github/workflows/playwright.yml
vendored
Normal file
77
.github/workflows/playwright.yml
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
name: Playwright Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- 'doc/**'
|
||||
- 'logo/**'
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- 'doc/**'
|
||||
- 'logo/**'
|
||||
schedule:
|
||||
- cron: "0 4 * * *" # Runs every day at 4am: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule
|
||||
|
||||
jobs:
|
||||
build-and-test-playwright:
|
||||
name: Playwright Tests (ubuntu-22.04, Node.js 22.x)
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 60
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
|
||||
- name: Use Node.js "22.x"
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
||||
with:
|
||||
node-version: "22.x"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
|
||||
- name: Use Python 3.13
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install IPython Kernel
|
||||
shell: bash
|
||||
run: |
|
||||
python3 -m pip install ipykernel==6.15.2
|
||||
python3 -m ipykernel install --user
|
||||
|
||||
- name: Build Browser
|
||||
shell: bash
|
||||
run: |
|
||||
npm ci
|
||||
npm run build:browser
|
||||
npm run download:plugins
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
|
||||
|
||||
- name: Build Playwright
|
||||
shell: bash
|
||||
run: |
|
||||
cd examples/playwright && npm run build
|
||||
|
||||
- name: Test (playwright)
|
||||
shell: bash
|
||||
run: cd examples/playwright && npm run ui-tests-ci
|
||||
|
||||
- name: Archive test results
|
||||
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 #v4
|
||||
if: ${{ !cancelled() }}
|
||||
with:
|
||||
name: playwright-test-results
|
||||
path: |
|
||||
examples/playwright/test-results/
|
||||
examples/playwright/playwright-report/
|
||||
retention-days: 7
|
||||
58
.github/workflows/production-smoke-test.yml
vendored
Normal file
58
.github/workflows/production-smoke-test.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
name: Production Build Smoke Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- 'doc/**'
|
||||
- 'logo/**'
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- 'doc/**'
|
||||
- 'logo/**'
|
||||
|
||||
jobs:
|
||||
build-and-test-playwright:
|
||||
name: Smoke Test for Browser Example Production Build on ubuntu-22.04 with Node.js 22.x
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 60
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
|
||||
- name: Use Node.js "22.x"
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
||||
with:
|
||||
node-version: "22.x"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
|
||||
- name: Use Python 3.13
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Build Browser Example Application for Production
|
||||
shell: bash
|
||||
run: |
|
||||
npm ci
|
||||
cd examples/browser && npm run build:production
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
|
||||
|
||||
- name: Build Playwright
|
||||
shell: bash
|
||||
run: |
|
||||
cd examples/playwright && npm run build
|
||||
|
||||
- name: Run Smoke Test (examples/playwright/src/tests/theia-app)
|
||||
shell: bash
|
||||
run: npm run test:playwright -- theia-app
|
||||
55
.github/workflows/publish-api-doc-gh-pages.yml
vendored
Normal file
55
.github/workflows/publish-api-doc-gh-pages.yml
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
name: Publish API Documentation on GitHub Pages
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish to NPM and GitHub pages
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
# The current approach is silly. We should be smarter and use `actions/upload-artifact` and `actions/download-artifact` instead of rebuilding
|
||||
# everything from scratch again. (git checkout, Node.js install, npm, etc.) It was not possible to share artifacts on Travis CI without an
|
||||
# external storage (such as S3), so we did rebuild everything before the npm publish. We should overcome this limitation with GH Actions.
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
with:
|
||||
fetch-depth: 0 # To fetch all history for all branches and tags. (Will be required for caching with lerna: https://github.com/markuplint/markuplint/pull/111)
|
||||
|
||||
- name: Use Node.js 22.x
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
||||
with:
|
||||
node-version: "22.x"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
|
||||
- name: Use Python 3.13
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install and Build
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
|
||||
|
||||
- name: Generate Documentation
|
||||
run: |
|
||||
npm run docs
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=8192
|
||||
|
||||
- name: Publish GH Pages
|
||||
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./gh-pages
|
||||
force_orphan: true # will only keep latest commit on branch gh-pages
|
||||
161
.github/workflows/publish-ci.yml
vendored
Normal file
161
.github/workflows/publish-ci.yml
vendored
Normal file
@@ -0,0 +1,161 @@
|
||||
name: Publish packages to NPM
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release_type:
|
||||
description: 'Release type: "minor" increments the minor version (e.g., 1.53.0 → 1.54.0), "patch" increments the patch version (e.g., 1.54.0 → 1.54.1), "next" publishes a pre-release version (e.g., 1.55.0-next.17).'
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- 'minor'
|
||||
- 'patch'
|
||||
- 'next'
|
||||
default: 'next'
|
||||
is_patch_to_previous:
|
||||
description: 'Patch a previous release branch: Enable this to publish a patch to an older version branch (e.g., patching 1.53.x when 1.54.x is the latest). Must be used with release_type="patch". Leave disabled for publishing to the current latest or next version.'
|
||||
required: true
|
||||
type: boolean
|
||||
default: false
|
||||
schedule:
|
||||
- cron: "0 0 * * 1" # Publish next version (default) every monday at midnight
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: Perform Publishing
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 60
|
||||
env:
|
||||
RELEASE_TYPE: ${{ inputs.release_type || 'next' }}
|
||||
IS_PATCH_TO_PREVIOUS: ${{ inputs.is_patch_to_previous || false }}
|
||||
steps:
|
||||
- name: Validate Inputs
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ env.IS_PATCH_TO_PREVIOUS }}" == "true" && "${{ env.RELEASE_TYPE }}" != "patch" ]]; then
|
||||
echo "Error: When 'is_patch_to_previous' is enabled, release_type must be 'patch'"
|
||||
exit 1
|
||||
fi
|
||||
echo "Input validation passed"
|
||||
echo "Release type: ${{ env.RELEASE_TYPE }}"
|
||||
echo "Is patch to previous: ${{ env.IS_PATCH_TO_PREVIOUS }}"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.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
|
||||
|
||||
- name: Use Node.js 22.x
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
||||
with:
|
||||
node-version: 22.x
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
|
||||
- name: Use Python 3.13
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install and build
|
||||
shell: bash
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
|
||||
|
||||
- name: Publish to NPM (Latest)
|
||||
# We only publish minor or patch releases for the current version as latest, never for older patches or next versions.
|
||||
if: ${{ (env.RELEASE_TYPE == 'patch' || env.RELEASE_TYPE == 'minor') && env.IS_PATCH_TO_PREVIOUS == 'false' }}
|
||||
shell: bash
|
||||
run: |
|
||||
npm run publish:latest ${{ env.RELEASE_TYPE }}
|
||||
npm run publish:check
|
||||
env:
|
||||
NPM_CONFIG_PROVENANCE: "true"
|
||||
|
||||
- name: Publish to NPM (Patch - To Previous Version)
|
||||
if: ${{ env.RELEASE_TYPE == 'patch' && env.IS_PATCH_TO_PREVIOUS == 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
npm run publish:patch ${{ env.RELEASE_TYPE }}
|
||||
npm run publish:check
|
||||
env:
|
||||
NPM_CONFIG_PROVENANCE: "true"
|
||||
|
||||
- name: Publish to NPM (Next)
|
||||
if: ${{ env.RELEASE_TYPE == 'next' }}
|
||||
shell: bash
|
||||
run: |
|
||||
npm run publish:next
|
||||
env:
|
||||
NPM_CONFIG_PROVENANCE: "true"
|
||||
|
||||
- name: Submit PR for package updates
|
||||
if: ${{ env.RELEASE_TYPE != 'next' }}
|
||||
shell: bash
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
# Configure git
|
||||
git config --local user.email "eclipse-theia-bot@eclipse.org"
|
||||
git config --local user.name "eclipse-theia-bot"
|
||||
|
||||
# Get the version from lerna.json after publishing
|
||||
VERSION=$(node -p "require('./lerna.json').version")
|
||||
echo "Lerna Version: $VERSION"
|
||||
|
||||
# First commit: Update packages/core/README.md
|
||||
if git diff --name-only | grep -q "packages/core/README.md"; then
|
||||
git add packages/core/README.md
|
||||
git commit -m "core: update re-exports for v${VERSION}"
|
||||
echo "First commit created for packages/core/README.md"
|
||||
else
|
||||
echo "No changes to packages/core/README.md"
|
||||
fi
|
||||
|
||||
# Second commit: Add all other changes
|
||||
git add .
|
||||
if git diff --staged --quiet; then
|
||||
echo "No other changes to commit"
|
||||
else
|
||||
git commit -m "v${VERSION}"
|
||||
echo "Second commit created for remaining changes"
|
||||
fi
|
||||
|
||||
# Submit PR
|
||||
if git log origin/${{ github.ref_name }}..HEAD | grep -q "commit"; then
|
||||
# Define PR body
|
||||
PR_BODY="Automated package updates for release v${VERSION}
|
||||
|
||||
To complete the release:
|
||||
- Update all remaining package versions locally
|
||||
- Amend the commits with your author details (to ensure the ECA check passes)
|
||||
- Keep the commits split (the re-export commit on the readme needs to be separate)
|
||||
- Force push the branch
|
||||
- Verify that all checks pass, and then \`rebase and merge\`"
|
||||
|
||||
# Create a new branch for the PR
|
||||
BRANCH_NAME="${{ github.ref_name }}-package-updates"
|
||||
git checkout -b "$BRANCH_NAME"
|
||||
git push origin "$BRANCH_NAME"
|
||||
|
||||
# Create PR using GitHub CLI
|
||||
gh pr create \
|
||||
--title "Release v${VERSION} - Package updates" \
|
||||
--body "$PR_BODY" \
|
||||
--base "${{ github.ref_name }}" \
|
||||
--head "$BRANCH_NAME"
|
||||
|
||||
echo "PR created for branch $BRANCH_NAME"
|
||||
else
|
||||
echo "No commits to push"
|
||||
fi
|
||||
60
.github/workflows/set-milestone-on-pr.yml
vendored
Normal file
60
.github/workflows/set-milestone-on-pr.yml
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
#
|
||||
# Copyright (c) 2020 Red Hat, Inc. and others.
|
||||
# This program and the accompanying materials are made available under the
|
||||
# terms of the Eclipse Public License v. 2.0 which is available at
|
||||
# http://www.eclipse.org/legal/epl-2.0.
|
||||
#
|
||||
# This Source Code may also be made available under the following Secondary
|
||||
# Licenses when the conditions for such availability set forth in the Eclipse
|
||||
# Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
# with the GNU Classpath Exception which is available at
|
||||
# https://www.gnu.org/software/classpath/license.html.
|
||||
#
|
||||
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
|
||||
# Set milestone on each pull request by using the next minor version
|
||||
# next version is computed using npm version tool
|
||||
on:
|
||||
pull_request_target:
|
||||
branches: [master]
|
||||
types: [closed]
|
||||
|
||||
jobs:
|
||||
set-milestone:
|
||||
if: github.event.pull_request.merged == true
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
- id: compute-milestone
|
||||
run: |
|
||||
export THEIA_CORE_VERSION=$(node -p "require(\"./packages/core/package.json\").version")
|
||||
echo "MILESTONE_NUMBER=$(npx -q semver@7 --increment minor $THEIA_CORE_VERSION)" >> $GITHUB_ENV
|
||||
- id: set
|
||||
uses: actions/github-script@ffc2c79a5b2490bd33e0a41c1de74b877714d736 # v3.2.0
|
||||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
script: |
|
||||
// get milestone
|
||||
const milestone = process.env.MILESTONE_NUMBER
|
||||
console.log(`Using milestone with name ${milestone}`)
|
||||
// check if milestone exists ?
|
||||
const issuesGetMilestonesParams = context.repo
|
||||
|
||||
// search if milestone is already defined
|
||||
const response = await github.issues.listMilestones(issuesGetMilestonesParams)
|
||||
let githubMilestone = response.data.find(milestoneResponse => milestoneResponse.title === milestone)
|
||||
|
||||
// not defined, create it
|
||||
if (!githubMilestone) {
|
||||
const issuesCreateMilestoneParams = { owner: context.repo.owner, repo:context.repo.repo, title: milestone }
|
||||
const createMilestoneResponse = await github.issues.createMilestone(issuesCreateMilestoneParams)
|
||||
githubMilestone = createMilestoneResponse.data
|
||||
}
|
||||
|
||||
// Grab the milestone number
|
||||
const milestoneNumber = githubMilestone.number
|
||||
|
||||
// sets the milestone from the number
|
||||
const issuesUpdateParams = { owner: context.repo.owner, repo: context.repo.repo, milestone: milestoneNumber, issue_number: context.issue.number }
|
||||
await github.issues.update(issuesUpdateParams)
|
||||
64
.github/workflows/translation.yml
vendored
Normal file
64
.github/workflows/translation.yml
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
name: Automatic Translation
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
translation:
|
||||
name: Translation Update
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 60
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
|
||||
- name: Use Node.js 22.x
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
||||
with:
|
||||
node-version: 22.x
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
|
||||
- name: Use Python 3.13
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install and Build
|
||||
shell: bash
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
|
||||
|
||||
- id: compute-next-version
|
||||
run: |
|
||||
export THEIA_CORE_VERSION=$(node -p "require(\"./packages/core/package.json\").version")
|
||||
echo "NEXT_VERSION_NUMBER=$(npx -q semver@7 --increment minor $THEIA_CORE_VERSION)" >> $GITHUB_ENV
|
||||
|
||||
- name: Perform Automatic Translation
|
||||
run: |
|
||||
node ./scripts/translation-update.js
|
||||
env:
|
||||
DEEPL_API_TOKEN: ${{ secrets.DEEPL_API_TOKEN }}
|
||||
|
||||
- name: Get Actor User Data
|
||||
uses: octokit/request-action@21d174fc38ff59af9cf4d7e07347d29df6dbaa99 # v2.3.0
|
||||
id: actor_user_data
|
||||
with:
|
||||
route: GET /users/{user}
|
||||
user: ${{ github.actor }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
|
||||
with:
|
||||
commiter: ${{ github.actor }} <${{ fromJson(steps.actor_user_data.outputs.data).email }}>
|
||||
author: ${{ github.actor }} <${{ fromJson(steps.actor_user_data.outputs.data).email }}>
|
||||
branch: bot/translation-update
|
||||
title: Translation update for version ${{ env.NEXT_VERSION_NUMBER }}
|
||||
commit-message: Translation update for version ${{ env.NEXT_VERSION_NUMBER }}
|
||||
body: Automated translation update for Theia version ${{ env.NEXT_VERSION_NUMBER }}. Triggered by @${{ github.actor }}.
|
||||
labels: localization
|
||||
Reference in New Issue
Block a user