Skip to content
Merged
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
46 changes: 23 additions & 23 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Setup
description: Setup Bun and install dependencies
description: Setup Pnpm and install dependencies

inputs:
working-directory:
Expand All @@ -10,32 +10,32 @@ inputs:
runs:
using: composite
steps:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
bun-version: latest
version: 10.11.0

- name: Restore dependencies
id: bun-cache
uses: actions/cache/restore@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
path: |
${{ inputs.working-directory }}/node_modules
~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ inputs.working-directory }}-${{ hashFiles(format('{0}/bun.lock', inputs.working-directory)) }}-${{ hashFiles(format('{0}/package.json', inputs.working-directory)) }}
restore-keys: |
${{ runner.os }}-bun-${{ inputs.working-directory }}-${{ hashFiles(format('{0}/bun.lock', inputs.working-directory)) }}-
node-version-file: '.nvmrc'
cache: 'pnpm'
cache-dependency-path: ${{ inputs.working-directory }}/pnpm-lock.yaml

- name: Install dependencies
run: bun install --frozen-lockfile
working-directory: ${{ inputs.working-directory }}
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Cache dependencies
if: steps.bun-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: |
${{ inputs.working-directory }}/node_modules
~/.bun/install/cache
key: ${{ steps.bun-cache.outputs.cache-primary-key }}
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-store-

- name: Install dependencies
working-directory: ${{ inputs.working-directory }}
shell: bash
run: |
pnpm install --frozen-lockfile --prefer-offline
32 changes: 7 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- checks_requested

jobs:
lint:
lint-and-typecheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -21,15 +21,15 @@ jobs:
uses: ./.github/actions/setup

- name: Lint files
run: bun run lint
run: pnpm run lint

- name: Build dependencies first
run: |
bun run workspace:core build
bun run workspace:react build
pnpm --filter @react-native-youtube-bridge/core build
pnpm --filter @react-native-youtube-bridge/react build

- name: Typecheck files
run: bun run typecheck
run: pnpm run typecheck

test:
runs-on: ubuntu-latest
Expand All @@ -41,7 +41,7 @@ jobs:
uses: ./.github/actions/setup

- name: Run unit tests
run: bun run test --maxWorkers=2 --coverage
run: pnpm run test --maxWorkers=2 --coverage

build-library:
runs-on: ubuntu-latest
Expand All @@ -53,22 +53,4 @@ jobs:
uses: ./.github/actions/setup

- name: Build package
run: bun run build

build-web:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Root
uses: ./.github/actions/setup

- name: Setup Example
uses: ./.github/actions/setup
with:
working-directory: example

- name: Build example for Web
run: |
bun run example expo export --platform web --clear
run: pnpm run build
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,19 @@ jobs:
- name: Setup
uses: ./.github/actions/setup

- name: Install Dependencies
run: bun install --frozen-lockfile

- name: Build
run: bun run build
run: |
pnpm clear
pnpm build

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: bun run release
commit: "chore(release): version packages"
title: "chore(release): version packages"
version: "pnpm changeset version"
publish: "pnpm changeset publish"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,6 @@ dist/
# expo native
example/ios/
example/android/

# coverage
coverage/
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v22.16.0
22
2,006 changes: 0 additions & 2,006 deletions bun.lock

This file was deleted.

14 changes: 0 additions & 14 deletions example/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,5 @@ module.exports = (api) => {

return {
presets: ['babel-preset-expo'],
plugins: [
[
'module-resolver',
{
root: ['./'],
alias: {
'react-native-youtube-bridge': '../packages/react-native-youtube-bridge/src/index',
'@react-native-youtube-bridge/core': '../packages/core/src/index',
'@react-native-youtube-bridge/react': '../packages/react/src/index',
},
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
},
],
],
};
};
Loading