Skip to content

Commit

Permalink
refactor: test bun instead of pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
byCedric committed Jul 3, 2024
1 parent ece9947 commit 93c2da4
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 14,605 deletions.
9 changes: 4 additions & 5 deletions .github/actions/setup-monorepo/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,15 @@ inputs:
runs:
using: composite
steps:
- name: 🏗 Setup pnpm
uses: pnpm/action-setup@v4
- name: 🏗 Setup Bun
uses: oven-sh/setup-bun@v1
with:
version: ${{ inputs.pnpm-version }}
bun0version: 1.x

- name: 🏗 Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: pnpm

- name: 🏗 Setup Expo
uses: expo/expo-github-action@v8
Expand All @@ -39,7 +38,7 @@ runs:
token: ${{ inputs.expo-token }}

- name: 📦 Install dependencies
run: pnpm install
run: bun install
shell: bash

- name: ♻️ Restore cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
expo-token: ${{ secrets.EXPO_TOKEN }}

- name: 👷 Build packages for mobile
run: pnpm run -w build:mobile
run: bun run build:mobile

# You can remove this step if you already configured this
# This project shouldn't be pre-configured with this ID, that's why its omitted
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
expo-token: ${{ secrets.EXPO_TOKEN }}

- name: 👷 Build packages
run: pnpm run -w build:mobile
run: bun run build:mobile

# You can remove this step if you already configured this
# This project shouldn't be pre-configured with this ID, that's why its omitted
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
uses: ./.github/actions/setup-monorepo

- name: ✅ Lint packages
run: pnpm run -w lint
run: bun run lint

- name: 👷 Build packages
run: pnpm run -w build
run: bun run build

- name: 🧪 Test packages
run: pnpm run -w test
run: bun run test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ node_modules
npm-debug.log
yarn-error.log
package-lock.json
pnpm-lock.yaml
pnpm-workspace.yaml

# Ruby
.direnv
Expand Down
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

2 changes: 1 addition & 1 deletion apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"eas-build-post-install": "pnpm run -w build:mobile"
"eas-build-post-install": "bun run --cwd ../.. build:mobile"
},
"dependencies": {
"@acme/feature-home": "workspace:*",
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"private": true,
"name": "@acme/monorepo",
"workspaces": [
"apps/*",
"packages/*"
],
"scripts": {
"dev": "turbo dev",
"dev:mobile": "turbo dev --filter=\"{./apps/mobile}...\"",
Expand Down
Loading

0 comments on commit 93c2da4

Please sign in to comment.