-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup theia folder with example app and config-store skeleton (#389)
## Setup new theia folder with example app and config-store extension skeleton - Create a new root-level folder `theia` for all theia extensions, corresponding example extensions and a test browser app. - The theia folder uses a copied version of the tsconfig and eslint settings of the node folder. - Initial setup of config-store extension, service and client - Add license check for theia folder - Depend on the exact version in the example app to avoid pulling older versions from the registry - Add Theia CI workflow to build all Theia extensions and the example app - Add reusable theia extension publish workflow ## Move monitor-theia extension to theia folder and setup Theia CI - Move monitor-theia extension from node/ to theia/extensions/ - Add monitor-theia to Theia example app - Adapt monitor theia Demo docker file - Adapt monitor extension workflow to only do the publishing
- Loading branch information
1 parent
99dd2c8
commit 5133b8e
Showing
60 changed files
with
12,810 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: "[THEIA] Publish monitor-theia" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "theia/yarn.lock" | ||
- "theia/extensions/monitor-theia/**" | ||
# Publish when a workflow has changed (this is needed to detect version updates) | ||
- ".github/workflows/cd-monitor-theia.yml" | ||
- ".github/workflows/reusable-theia-extension.yml" | ||
release: | ||
types: | ||
- published | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
jobs: | ||
run: | ||
uses: ./.github/workflows/reusable-theia-extension.yml | ||
permissions: | ||
contents: read | ||
id-token: write | ||
with: | ||
package_workspace: extensions/monitor-theia | ||
secrets: | ||
npm-token: ${{ secrets.NPM_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Builds all theia extensions as well as the example extensions and example browser app. | ||
name: "[THEIA] CI" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- ".github/workflows/ci-theia.yml" | ||
- "theia/**/*" | ||
- "!theia/**/*.md" | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- ".github/workflows/ci-theia.yml" | ||
- "theia/**/*" | ||
- "!theia/**/*.md" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
name: Build & Lint | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./theia | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: yarn | ||
cache-dependency-path: theia/yarn.lock | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install libsecret-1-dev | ||
yarn --frozen-lockfile | ||
- name: Build | ||
run: yarn build | ||
|
||
- name: Lint | ||
run: yarn lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Reusable workflow for publishing theia extensions | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
package_workspace: | ||
required: true | ||
type: string | ||
description: The package's workspace path relative to the node directory. | ||
secrets: | ||
npm-token: | ||
required: true | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' || github.event_name == 'release' | ||
defaults: | ||
run: | ||
working-directory: ./theia | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check version (only for push events) | ||
if: github.event_name == 'push' | ||
id: version_check | ||
run: | | ||
VERSION=$(cd extensions/${{ inputs.package_workspace }} && node --print "require('./package.json').version") | ||
echo "Package version: ${VERSION}" | ||
if [[ $VERSION == *"-next" ]]; then | ||
echo "is_next_version=true" >> $GITHUB_OUTPUT | ||
else | ||
echo "is_next_version=false" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
registry-url: "https://registry.npmjs.org" | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install libsecret-1-dev | ||
yarn --frozen-lockfile | ||
# Publish the package to the npm registry. The publish command also builds the package via the prepublishOnly lifecycle script. | ||
- name: Publish next version | ||
if: github.event_name == 'push' && steps.version_check.outputs.is_next_version == 'true' | ||
run: npm run publish:next -w ${{ inputs.package_workspace }} | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.npm-token }} | ||
NPM_CONFIG_PROVENANCE: true | ||
|
||
- name: Publish latest version | ||
if: github.event_name == 'release' | ||
run: npm run publish:latest -w ${{ inputs.package_workspace }} | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.npm-token }} | ||
NPM_CONFIG_PROVENANCE: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,8 +31,8 @@ | |
}, | ||
"workspaces": [ | ||
"common", | ||
"config-store", | ||
"landing-page", | ||
"monitor-theia", | ||
"testing-page" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** @type {import('eslint').Linter.Config} */ | ||
module.exports = { | ||
root: true, | ||
extends: [ | ||
'./configs/base.eslintrc.json', | ||
'./configs/warnings.eslintrc.json', | ||
'./configs/errors.eslintrc.json', | ||
], | ||
parserOptions: { | ||
tsconfigRootDir: __dirname, | ||
project: 'tsconfig.json', | ||
}, | ||
settings: { | ||
"react": { | ||
"version": "detect" | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = { | ||
$schema: 'http://json.schemastore.org/prettierrc', | ||
singleQuote: true, | ||
jsxSingleQuote: true, | ||
arrowParens: 'avoid', | ||
trailingComma: 'none', | ||
endOfLine: 'lf', | ||
printWidth: 120, | ||
tabWidth: 2, | ||
overrides: [ | ||
{ | ||
files: ['*.json', '*.yml'], | ||
options: { | ||
printWidth: 100, | ||
tabWidth: 2 | ||
} | ||
} | ||
] | ||
}; |
Oops, something went wrong.