Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EXP] Migrate to Nx & PNPM #5

Open
wants to merge 13 commits into
base: re-architecture-benchmark
Choose a base branch
from
60 changes: 60 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# This workflow will build PRs submitted to the master branch.

name: Benchmark

on:
pull_request:
branches: [ re-architecture-benchmark ]
paths-ignore:
- "docs/**"
- "CONTRIBUTING.md"
- "CREDITS.md"
- "LICENSE"
- "pull_request_template.md"
- "README.md"
- "**/README.md"
- "SECURITY.md"
workflow_dispatch:

jobs:
benchmark:
name: ⏲️ Benchmark
strategy:
matrix:
node-version: [ 12.x, 14.x ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: ⬇️ Checkout
id: checkout
uses: actions/[email protected]
with:
fetch-depth: 2

- name: 🟢 Setup node
id: setup-node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: 🥡 Setup pnpm
uses: pnpm/[email protected]
with:
version: 6.0.2
run_install: true

- name: 🏗️ Build
id: build-the-project
run: npx nx run-many --target=build --all --with-deps

- name: 🌵 Build with Cache
id: build-the-project-with-cache
run: npx nx run-many --target=build --all --with-deps

- name: 🔆 Cache pnpm modules
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
2 changes: 1 addition & 1 deletion apps/authentication-portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"build": "node scripts/build.js"
},
"dependencies": {
"@wso2is/theme": "^1.2.893"
"@wso2is/theme": "*"
}
}
2 changes: 1 addition & 1 deletion apps/authentication-portal/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const path = require("path");
const fs = require("fs-extra");

const srcDir = path.join(__dirname, "..", "src", "main", "webapp");
const themeModuleDir = path.join(__dirname, "../", "node_modules", "@wso2is", "theme");
const themeModuleDir = path.join(__dirname, "..", "..", "..", "node_modules", "@wso2is", "theme");

fs.copy(path.join(themeModuleDir, "dist", "lib"), path.join(srcDir, "libs"))
.then(() => {
Expand Down
Loading