Skip to content
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
96 changes: 72 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,26 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 11.5.0
run_install: false

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24.14.0'
cache: 'npm'
cache: 'pnpm'

- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile

- name: Check JS formatting
run: npm run format:js:check
run: pnpm run format:js:check

- name: Run JS linter
run: npm run lint:libOnly
run: pnpm run lint:libOnly

js-build:
name: '[JS] Build'
Expand All @@ -42,17 +48,23 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 11.5.0
run_install: false

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24.14.0'
cache: 'npm'
cache: 'pnpm'

- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile

- name: Build JS packages
run: npm run build:all
run: pnpm run build:all

typecheck:
name: '[JS] Types validation'
Expand All @@ -61,17 +73,23 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 11.5.0
run_install: false

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24.14.0'
cache: 'npm'
cache: 'pnpm'

- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile

- name: Run type check
run: npm run typecheck
run: pnpm run typecheck

test:
name: '[JS] Test'
Expand All @@ -80,17 +98,23 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 11.5.0
run_install: false

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24.14.0'
cache: 'npm'
cache: 'pnpm'

- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile

- name: Run JS tests via Turbo
run: npm run test:js
run: pnpm run test:js

native-kotlin-test:
name: '[Kotlin] Test'
Expand All @@ -108,21 +132,27 @@ jobs:
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 11.5.0
run_install: false

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24.14.0'
cache: 'npm'
cache: 'pnpm'

- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile

- name: Build monorepo
run: npm run build:all
run: pnpm run build:all

- name: Generate Android native project
working-directory: example
run: CI=1 npx expo prebuild --platform android
run: CI=1 pnpm exec expo prebuild --platform android

- name: Run Kotlin native tests
working-directory: example/android
Expand All @@ -135,17 +165,23 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 11.5.0
run_install: false

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24.14.0'
cache: 'npm'
cache: 'pnpm'

- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile

- name: Run Swift native tests
run: npm run test:swift
run: pnpm run test:swift

swiftformat:
name: '[Swift] Format & Lint'
Expand All @@ -154,14 +190,20 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 11.5.0
run_install: false

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24.14.0'
cache: 'npm'
cache: 'pnpm'

- name: Check Swift formatting
run: npm run format:swift:check
run: pnpm run format:swift:check

ktlint:
name: '[Kotlin] Format & Lint'
Expand All @@ -173,11 +215,17 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 11.5.0
run_install: false

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24.14.0'
cache: 'npm'
cache: 'pnpm'

# Downloading the pinned release binary is much faster in CI than installing ktlint via Homebrew.
- name: Install ktlint
Expand All @@ -194,4 +242,4 @@ jobs:
run: ktlint --version

- name: Check Kotlin formatting
run: npm run format:kotlin:check
run: pnpm run format:kotlin:check
22 changes: 12 additions & 10 deletions .github/workflows/website-release-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,27 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 11.5.0
run_install: false

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24.14.0'
cache: 'npm'
cache-dependency-path: website/package-lock.json
cache: 'pnpm'
cache-dependency-path: pnpm-lock.yaml

- name: Install dependencies
working-directory: website
run: npm ci

- name: Install Vercel CLI
run: npm install --global vercel@latest
run: pnpm install --frozen-lockfile

- name: Pull Vercel environment information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
run: pnpm --filter voltra-website exec vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}

- name: Build project artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
run: pnpm --filter voltra-website exec vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy prebuilt artifacts to production
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
run: pnpm --filter voltra-website exec vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
14 changes: 7 additions & 7 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@
"react-native-web": "^0.21.0",
"react-native-webview": "13.16.0",
"react-native-worklets": "~0.7.0",
"@use-voltra/ios": "*",
"@use-voltra/ios-client": "*",
"@use-voltra/android": "*",
"@use-voltra/android-client": "*",
"@use-voltra/ios-server": "*",
"@use-voltra/android-server": "*",
"@use-voltra/server": "*"
"@use-voltra/ios": "workspace:*",
"@use-voltra/ios-client": "workspace:*",
"@use-voltra/android": "workspace:*",
"@use-voltra/android-client": "workspace:*",
"@use-voltra/ios-server": "workspace:*",
"@use-voltra/android-server": "workspace:*",
"@use-voltra/server": "workspace:*"
},
"devDependencies": {
"@babel/core": "^7.25.2",
Expand Down
4 changes: 2 additions & 2 deletions example/screens/android/AndroidMaterialColorsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default function AndroidMaterialColorsScreen() {
setPreviewTimestamp('server timestamp')
Alert.alert(
'Server render requested',
'The widget will fetch fresh JSON from the example server. Make sure `npm run widget:server --workspace voltra-example` is running on your host machine.'
'The widget will fetch fresh JSON from the example server. Make sure `pnpm --filter voltra-example run widget:server` is running on your host machine.'
)
} catch (error: any) {
const message = error?.message || String(error)
Expand Down Expand Up @@ -188,7 +188,7 @@ export default function AndroidMaterialColorsScreen() {
<Card.Title>Server Setup</Card.Title>
<Card.Text>Run the example widget server before using the server render button:</Card.Text>
<View style={styles.codeBlock}>
<Text style={styles.codeText}>npm run widget:server --workspace voltra-example</Text>
<Text style={styles.codeText}>pnpm --filter voltra-example run widget:server</Text>
</View>
<Card.Text>
Android emulators use <Text style={styles.code}>10.0.2.2</Text> in the widget config, so the built-in
Expand Down
Loading
Loading