Skip to content

Commit

Permalink
ci: switch to pnpm (#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcanueste committed Jul 27, 2023
1 parent d63c9ee commit 3fddf0b
Show file tree
Hide file tree
Showing 9 changed files with 17,832 additions and 24,810 deletions.
33 changes: 27 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,49 @@ 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 -C ./db/prisma/ prisma:generate
pnpm run -r build
# - name: Test
# run: npm run test
24 changes: 24 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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

# see https://turbo.build/repo/docs/handbook/tools/prisma#2-add-a-new-database-package
public-hoist-pattern[]=*prisma*

shamefully-hoist=true
2 changes: 2 additions & 0 deletions apps/kampus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
"extends": "../../package.json"
},
"devDependencies": {
"@kampus/ui-next": "*",
"@kampus/tailwind": "*",
"@types/react-relay": "14.1.4",
"relay-compiler": "15.0.0"
},
"dependencies": {
"@kampus/next-auth": "*",
"@kampus/relay": "*",
"@kampus/ui-next": "*",
"react-relay": "15.0.0",
"znv": "0.3.2",
"zod": "3.21.4"
Expand Down
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 3fddf0b

Please sign in to comment.