mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Restructure to monorepo (#6907)
* wip: restructure to monorepo Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * refactor create-release-pr to a package Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * build fixes Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * github workflow fixes Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * fix typo Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * add webpack-env types to core Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * fix github workflows Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * refactor/fix integration tests Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * lint fix Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * yarn run dev Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * eslint settings for vscode Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * move templates to right package Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * open-lens build fixes Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * integration test fix Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * fix nx task dependencies Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * use bash shell for unit tests in test workflow Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * fix test:unit for windows Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * fix win-ca webpack error in open-lens Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * fix win-ca webpack error in open-lens Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * fix build:app on windows Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * remove ELECTRON_BUILDER_EXTRA_ARGS Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * sync src/ from master Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * remove Makefile from core Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
1 parent
0066ca4ea2
commit
2657df2293
3321 files changed
+28699
-11447
No files matched your search
@@ -19,11 +19,11 @@ jobs:
|
||||
fetch-depth: 0
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
npm i --location=global semver
|
||||
yarn install --frozen-lockfile
|
||||
- name: Bump version to first alpha of next minor version
|
||||
id: bump
|
||||
run: |
|
||||
CURRENT_VERSION=$(cat package.json | jq .version --raw-output)
|
||||
CURRENT_VERSION=$(cat lerna.json | jq .version --raw-output)
|
||||
|
||||
if ! [[ "${CURRENT_VERSION}" =~ ^\d+\.\d+\.0$ ]]; then
|
||||
echo "Not a minor release"
|
||||
@@ -31,15 +31,13 @@ jobs:
|
||||
exit 0
|
||||
fi
|
||||
|
||||
NEW_VERSION=$(cat package.json | jq .version --raw-output | xargs semver -i preminor --preid alpha)
|
||||
cat package.json | jq --arg new_version "$NEW_VERSION" '.version = $new_version' > new-package.json
|
||||
mv new-package.json package.json
|
||||
yarn bump-version preminor
|
||||
|
||||
echo "status=create" >> $GITHUB_OUTPUT
|
||||
- uses: peter-evans/create-pull-request@v4
|
||||
if: ${{ steps.bump.outputs.status == 'create' }}
|
||||
with:
|
||||
add-paths: package.json
|
||||
add-paths: lerna.json,packages/*/package.json
|
||||
commit-message: Update package.json version to next preminor because of recent release
|
||||
signoff: true
|
||||
delete-branch: true
|
||||
|
||||
@@ -24,8 +24,8 @@ jobs:
|
||||
- name: Generate Extensions API Reference using typedocs
|
||||
run: |
|
||||
yarn install
|
||||
yarn typedocs-extensions-api
|
||||
yarn run build:docs
|
||||
|
||||
- name: Verify that the markdown is valid
|
||||
run: |
|
||||
yarn run verify-docs
|
||||
yarn run mkdocs:verify
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
|
||||
- uses: doyensec/electronegativity-action@v1.1
|
||||
with:
|
||||
input: src/
|
||||
input: packages/core/src/
|
||||
electron-version: "19.0.4"
|
||||
severity: medium
|
||||
|
||||
|
||||
@@ -25,4 +25,4 @@ jobs:
|
||||
set -e
|
||||
export PATH=${PATH}:`go env GOPATH`/bin
|
||||
|
||||
addlicense -check -l mit -c "OpenLens Authors" src/**/*.?css
|
||||
addlicense -check -l mit -c "OpenLens Authors" packages/*/src/**/*.?css
|
||||
@@ -35,11 +35,11 @@ jobs:
|
||||
- name: Generate Extensions API Reference using typedocs
|
||||
run: |
|
||||
yarn install
|
||||
yarn typedocs-extensions-api
|
||||
yarn run build:docs
|
||||
|
||||
- name: Verify that the markdown is valid
|
||||
run: |
|
||||
yarn run verify-docs
|
||||
yarn run mkdocs:verify
|
||||
|
||||
build:
|
||||
name: Deploy docs
|
||||
@@ -77,8 +77,8 @@ jobs:
|
||||
|
||||
- name: Generate Extensions API Reference using typedocs
|
||||
run: |
|
||||
yarn install
|
||||
yarn typedocs-extensions-api
|
||||
yarn install --frozen-lockfile
|
||||
yarn build:docs
|
||||
|
||||
- name: mkdocs deploy master
|
||||
if: contains(github.ref, 'refs/heads/master')
|
||||
|
||||
@@ -25,13 +25,11 @@ jobs:
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Generate NPM package
|
||||
- name: Generate NPM packages
|
||||
run: |
|
||||
make build-extensions-npm
|
||||
yarn install --frozen-lockfile
|
||||
yarn run build
|
||||
|
||||
- name: publish new release
|
||||
- name: Publish NPM package
|
||||
run: |
|
||||
make publish-extensions-npm
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
NPM_RELEASE_TAG: master
|
||||
yarn lerna publish from-package --dist-tag master --no-push --no-git-tag-version --yes
|
||||
@@ -12,8 +12,8 @@ on:
|
||||
type: string
|
||||
description: The version to release manually
|
||||
jobs:
|
||||
publish-extensions:
|
||||
name: Publish Extensions NPM Package Release
|
||||
publish-npm-packages:
|
||||
name: Publish NPM Packages
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -30,39 +30,13 @@ jobs:
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Generate NPM package
|
||||
- name: Generate NPM packages
|
||||
run: |
|
||||
make build-extensions-npm
|
||||
yarn install --frozen-lockfile
|
||||
yarn run build
|
||||
|
||||
- name: Publish NPM package
|
||||
- name: Publish NPM packages
|
||||
run: |
|
||||
make publish-extensions-npm
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
publish-library:
|
||||
name: Publish Library NPM Package Release
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x]
|
||||
steps:
|
||||
- name: Checkout Release
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ inputs.version }}
|
||||
|
||||
- name: Using Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Generate NPM package
|
||||
run: |
|
||||
make build-library-npm
|
||||
|
||||
- name: Publish NPM package
|
||||
run: |
|
||||
make publish-library-npm
|
||||
yarn lerna publish from-package --no-push --no-git-tag-version --yes
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
@@ -51,10 +51,11 @@ jobs:
|
||||
timeout_minutes: 10
|
||||
max_attempts: 3
|
||||
retry_on: error
|
||||
command: make node_modules
|
||||
command: yarn install --frozen-lockfile
|
||||
|
||||
- run: make test
|
||||
name: Run tests
|
||||
shell: bash
|
||||
if: ${{ matrix.type == 'unit' }}
|
||||
|
||||
- run: make ci-validate-dev
|
||||
@@ -68,20 +69,16 @@ jobs:
|
||||
minikube-version: latest
|
||||
if: ${{ runner.os == 'Linux' && matrix.type == 'smoke' }}
|
||||
|
||||
- run: xvfb-run --auto-servernum --server-args='-screen 0, 1600x900x24' make integration
|
||||
- run: xvfb-run --auto-servernum --server-args='-screen 0, 1600x900x24' yarn run test:integration
|
||||
name: Run Linux integration tests
|
||||
if: ${{ runner.os == 'Linux' && matrix.type == 'smoke' }}
|
||||
|
||||
- run: make integration
|
||||
- run: yarn run test:integration
|
||||
name: Run macOS integration tests
|
||||
shell: bash
|
||||
env:
|
||||
ELECTRON_BUILDER_EXTRA_ARGS: "--x64 --arm64"
|
||||
if: ${{ runner.os == 'macOS' && matrix.type == 'smoke' }}
|
||||
|
||||
- run: make integration
|
||||
- run: yarn run test:integration
|
||||
name: Run Windows integration tests
|
||||
shell: bash
|
||||
env:
|
||||
ELECTRON_BUILDER_EXTRA_ARGS: "--x64 --ia32"
|
||||
if: ${{ runner.os == 'Windows' && matrix.type == 'smoke' }}
|
||||
Reference in new issue
Block a user