Skip to content

Commit

Permalink
ci: switch to pnpm (kamp-us#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcanueste committed Jul 24, 2023
1 parent d63c9ee commit 3a3eb63
Show file tree
Hide file tree
Showing 9 changed files with 17,920 additions and 24,810 deletions.
31 changes: 25 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,47 @@ jobs:
name: Build and Test
timeout-minutes: 15
runs-on: ubuntu-latest

# To use Remote Caching, uncomment the next lines and follow the steps below.
# env:
# TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
# TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
# TURBO_REMOTE_ONLY: true

steps:
- name: Check out code
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Setup Node.js environment
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version-file: "package.json"

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: npm install
run: pnpm install

- name: Build
run: npm run build
run: pnpm run -r build

# - name: Test
# run: npm run test
23 changes: 23 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Disable `workspace:*` syntax for defining workspace package dependencies.
#
# See: https://pnpm.io/npmrc#save-workspace-protocol
save-workspace-protocol=false

# Link locally available packages to `node_modules` instead of downloading
# from registry.
#
# See: https://pnpm.io/npmrc#link-workspace-packages
link-workspace-packages=true

# Prefer workspace packages over packages on the registry even if there is
# a newer version of the workspace package is available on registry.
#
# Note: Only useful if `save-workspace-protocol=false`, otherwise
# `workspace:*` syntax will handle this case anyway.
#
# See: https://pnpm.io/npmrc#prefer-workspace-packages
prefer-workspace-packages=true

# hoist=false
# public-hoist-pattern[]=*ui-next*
# node-linker=hoisted
2 changes: 2 additions & 0 deletions apps/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"extends": "../../package.json"
},
"devDependencies": {
"@kampus/kampus": "*",
"@kampus/tailwind": "*",
"@kampus/ui-next": "*",
"@storybook/addon-a11y": "^7.0.20",
"@storybook/addon-essentials": "^7.0.20",
"@storybook/addon-interactions": "^7.0.20",
Expand Down
Loading

0 comments on commit 3a3eb63

Please sign in to comment.