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 Turbo & PNPM #4

Open
wants to merge 7 commits into
base: re-architecture-benchmark
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# 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: 🔆 Cache pnpm modules
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-

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

- name: 🛠️ Bootstrap Dependencies
id: bootstrap-dependencies
run: pnpm run bootstrap

- name: 🏗️ Build
id: build-the-project
run: pnpm build

- name: 🌵 Build with Cache
id: build-the-project-with-cache
run: pnpm build
126 changes: 67 additions & 59 deletions .github/workflows/pr-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,27 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: 🛠️ Bootstrap Dependencies
id: bootstrap-npm-and-lerna-dependencies
run: npm run bootstrap

- name: ⏳ Lint
run: npm run lint:ci

- name: 🔆 Cache NPM directory
id: cache-npm-modules
- name: 🔆 Cache pnpm modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

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

- name: 🛠️ Bootstrap Dependencies
id: bootstrap-dependencies
run: pnpm run bootstrap

- name: ⏳ Lint
run: pnpm run lint:ci

typecheck:
name: ʦ Typecheck (STATIC ANALYSIS)
runs-on: ubuntu-latest
Expand All @@ -69,24 +72,31 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: 🛠️ Bootstrap Dependencies
id: bootstrap-npm-and-lerna-dependencies
run: npm run bootstrap

- name: ☄️ Check Type Errors
run: npm run typecheck

- name: 🔆 Cache NPM directory
id: cache-npm-modules
- name: 🔆 Cache pnpm modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

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

- name: 🛠️ Bootstrap Dependencies
id: bootstrap-dependencies
run: pnpm run bootstrap

- name: 👷 Build Re-usable Modules
id: build-reusable-modules
run: pnpm run build:modules

- name: ☄️ Check Type Errors
run: npm run typecheck

test:
name: 👾 Unit Test (TESTING)
needs: [ lint, typecheck ]
Expand All @@ -105,35 +115,34 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: 🛠️ Bootstrap Dependencies
id: bootstrap-npm-and-lerna-dependencies
run: npm run bootstrap
- name: 🔆 Cache pnpm modules
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-

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

- name: 👷 Build Re-usable Modules
id: build-reusable-modules
run: npm run build:modules
run: pnpm run build:modules

- name: 🃏 Run Jest & Collect Coverage
id: run-jest-test-and-coverage
run: npm run test:unit:coverage
run: pnpm run test:unit:coverage

- name: 🤖 Aggregate Test Coverage
id: aggregate-coverage-reports
run: |
npm run test:unit:coverage:aggregate
npm run nyc:text-summary-report
npm run nyc:text-report

- name: 🔆 Cache NPM directory
id: cache-npm-modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
pnpm run test:unit:coverage:aggregate
pnpm run nyc:text-summary-report
pnpm run nyc:text-report

build:
name: 🚧 Build
Expand Down Expand Up @@ -167,25 +176,24 @@ jobs:
with:
maven-version: ${{ matrix.maven-version }}

- name: 🛠️ Bootstrap Dependencies
id: bootstrap-npm-and-lerna-dependencies
run: npm run bootstrap

- name: 🏗️ Maven Build
id: build-with-maven
run: mvn clean install -U -Dlint.exec.skip=true -Dbootstrap.exec.skip=true

- name: 🔆 Cache NPM directory
id: cache-npm-modules
- name: 🔆 Cache pnpm modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

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

- name: 🏗️ Maven Build
id: build-with-maven
run: mvn clean install -U -Dlint.exec.skip=true -Dbootstrap.exec.skip=true

- name: 💾 Cache local Maven repository
id: cache-maven-m2
uses: actions/cache@v2
Expand Down
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": "*"
}
}
Loading