Fix CI after switching to pnpm (#32449)
* Simplify CI for shared-components Now that we use pnpm which understands monorepos we can skip manually installing shared-components in CI Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix docs workflow not being able to find pnpm version Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix storybook workflow not seeing lockfile and using wrong package manager Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix dockerbuild Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -7,6 +7,7 @@ karma-reports/
|
|||||||
.idea/
|
.idea/
|
||||||
.tmp/
|
.tmp/
|
||||||
config.json*
|
config.json*
|
||||||
|
.link-config
|
||||||
# Exclude the playwright directory as much as we can as the snapshots are huge and we bind mount it in
|
# Exclude the playwright directory as much as we can as the snapshots are huge and we bind mount it in
|
||||||
playwright/
|
playwright/
|
||||||
!playwright/docker-entrypoint.sh
|
!playwright/docker-entrypoint.sh
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ jobs:
|
|||||||
path: matrix-js-sdk
|
path: matrix-js-sdk
|
||||||
|
|
||||||
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
|
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
|
||||||
|
with:
|
||||||
|
package_json_file: element-web/package.json
|
||||||
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
|
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
|
||||||
with:
|
with:
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
|
|||||||
@@ -31,11 +31,6 @@ jobs:
|
|||||||
- name: 🛠️ Setup EW
|
- name: 🛠️ Setup EW
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: 🛠️ Setup
|
|
||||||
# When running `install` it also calls the `prepare` step which generates
|
|
||||||
# a build
|
|
||||||
run: pnpm --dir packages/shared-components install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: 🚀 Publish to npm
|
- name: 🚀 Publish to npm
|
||||||
working-directory: packages/shared-components
|
working-directory: packages/shared-components
|
||||||
run: npm publish --access public --provenance
|
run: npm publish --access public --provenance
|
||||||
|
|||||||
@@ -39,4 +39,5 @@ jobs:
|
|||||||
apiToken: ${{ secrets.CF_PAGES_TOKEN }}
|
apiToken: ${{ secrets.CF_PAGES_TOKEN }}
|
||||||
accountId: ${{ secrets.CF_PAGES_ACCOUNT_ID }}
|
accountId: ${{ secrets.CF_PAGES_ACCOUNT_ID }}
|
||||||
workingDirectory: "packages/shared-components"
|
workingDirectory: "packages/shared-components"
|
||||||
|
packageManager: "pnpm"
|
||||||
command: pages deploy storybook-static --project-name=shared-components-storybook
|
command: pages deploy storybook-static --project-name=shared-components-storybook
|
||||||
|
|||||||
@@ -36,9 +36,6 @@ jobs:
|
|||||||
- name: Typecheck
|
- name: Typecheck
|
||||||
run: "pnpm run lint:types"
|
run: "pnpm run lint:types"
|
||||||
|
|
||||||
- name: Install Shared Component Dependencies
|
|
||||||
run: "pnpm --dir packages/shared-components install"
|
|
||||||
|
|
||||||
- name: Typecheck Shared Components
|
- name: Typecheck Shared Components
|
||||||
run: "pnpm --dir packages/shared-components run lint:types"
|
run: "pnpm --dir packages/shared-components run lint:types"
|
||||||
|
|
||||||
@@ -100,9 +97,6 @@ jobs:
|
|||||||
- name: Run Linter
|
- name: Run Linter
|
||||||
run: "pnpm run lint:js"
|
run: "pnpm run lint:js"
|
||||||
|
|
||||||
- name: Install Shared Component Deps
|
|
||||||
run: "pnpm --dir packages/shared-components install --frozen-lockfile"
|
|
||||||
|
|
||||||
- name: Run Linter
|
- name: Run Linter
|
||||||
run: "pnpm --dir packages/shared-components run lint:js"
|
run: "pnpm --dir packages/shared-components run lint:js"
|
||||||
|
|
||||||
|
|||||||
@@ -21,9 +21,8 @@ fi
|
|||||||
echo "Linking js-sdk"
|
echo "Linking js-sdk"
|
||||||
git clone --depth 1 --branch $JS_SDK_BRANCH "$JS_SDK_REPO" js-sdk
|
git clone --depth 1 --branch $JS_SDK_BRANCH "$JS_SDK_REPO" js-sdk
|
||||||
cd js-sdk
|
cd js-sdk
|
||||||
pnpm link
|
|
||||||
pnpm install
|
pnpm install
|
||||||
cd ../
|
cd ../
|
||||||
|
|
||||||
echo "Setting up element-web with js-sdk package"
|
echo "Setting up element-web with js-sdk package"
|
||||||
pnpm link matrix-js-sdk
|
pnpm link ./js-sdk
|
||||||
|
|||||||
Reference in New Issue
Block a user