Skip to content

fix: serializeAnchor uses new NSKeyedArchiver function #756

fix: serializeAnchor uses new NSKeyedArchiver function

fix: serializeAnchor uses new NSKeyedArchiver function #756

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Test
on:
workflow_call:
inputs:
bun-version:
description: "Bun Version"
required: false
type: string
os:
description: "Operating System"
required: false
type: string
workflow_dispatch:
inputs:
bun-version:
description: "Bun Version"
required: false
default: "latest"
type: string
os:
description: "Operating System"
required: false
options:
- "ubuntu-latest"
- "macos-latest"
- "windows-latest"
default: "ubuntu-latest"
type: choice
pull_request:
push:
branches:
- main
- master
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
changes:
runs-on: ubuntu-latest
outputs:
healthkit_contracts: ${{ steps.filter.outputs.healthkit_contracts }}
swift_native: ${{ steps.filter.outputs.swift_native }}
permissions:
pull-requests: read
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
healthkit_contracts:
- '.bun-version'
- 'bun.lock'
- 'package.json'
- 'packages/react-native-healthkit/src/**'
- 'packages/react-native-healthkit/ios/**'
- 'packages/react-native-healthkit/cpp/**'
- 'packages/react-native-healthkit/scripts/**'
- 'packages/react-native-healthkit/nitrogen/**'
- 'packages/react-native-healthkit/package.json'
- 'packages/react-native-healthkit/tsconfig*.json'
- 'apps/example/contracts/**'
- 'apps/example/scripts/run-healthkit-contracts.sh'
- 'apps/example/app.json'
- 'apps/example/app/contracts.tsx'
- 'apps/example/app/_layout.tsx'
- 'apps/example/app/auth.tsx'
- 'apps/example/constants/AllUsedIdentifiersInApp.ts'
- 'apps/example/ios/**'
- 'apps/example/package.json'
- '.github/workflows/test.yml'
swift_native:
- 'packages/react-native-healthkit/ios/**'
- 'packages/react-native-healthkit/cpp/**'
- 'apps/example/ios/**'
test:
# The type of runner that the job will run on
runs-on: ${{ inputs.os || 'ubuntu-latest' }}
timeout-minutes: 10
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version-file: ".bun-version"
- run: bun install
- name: Test
run: bun run test
typecheck:
runs-on: ${{ inputs.os || 'ubuntu-latest' }}
timeout-minutes: 10
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version-file: ".bun-version"
- run: bun install --ignore-scripts --frozen-lockfile
- name: Typecheck
run: bun run typecheck
lint:
# The type of runner that the job will run on
runs-on: ${{ inputs.os || 'ubuntu-latest' }}
timeout-minutes: 10
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version-file: ".bun-version"
- run: bun install --ignore-scripts --frozen-lockfile
- name: Lint
run: bun run lint
swiftlint:
needs: changes
if: needs.changes.outputs.swift_native == 'true'
# The type of runner that the job will run on
runs-on: macos-15
timeout-minutes: 10
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version-file: ".bun-version"
- run: bun install --ignore-scripts --frozen-lockfile
- run: brew install swiftlint
- name: Lint
run: bun run swiftlint
# build-ios-beta:
# # Only run on macOS since we need Xcode
# runs-on: macos-15
# timeout-minutes: 50
# steps:
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# - uses: actions/checkout@v4
# - uses: oven-sh/setup-bun@v2
# with:
# bun-version-file: .bun-version
# - name: Install dependencies
# run: bun install --ignore-scripts --frozen-lockfile
# ## latest stable
# - run: sudo xcode-select -s /Applications/Xcode_26.0.app
# - name: Install iOS 26 simulator runtime
# run: |
# xcodebuild -downloadPlatform iOS
# # optional but useful:
build-ios:
needs: changes
if: needs.changes.outputs.healthkit_contracts == 'true'
# Only run on macOS since we need Xcode
runs-on: macos-15
timeout-minutes: 25
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version-file: ".bun-version"
- name: Install dependencies
run: bun install --ignore-scripts --frozen-lockfile
## Xcode 26.2 (Swift 6.2) - latest stable
- run: sudo xcode-select -s /Applications/Xcode_26.2.app
- name: Install simulator tooling
run: |
brew tap wix/brew
brew install applesimutils
- name: Verify generated HealthKit schema and bindings
working-directory: packages/react-native-healthkit
run: bun run check:generated
- run: bun run codegen
working-directory: packages/react-native-healthkit
- name: Expo Prebuild
working-directory: apps/example
run: bunx expo prebuild --platform ios --non-interactive
- name: Build iOS project
working-directory: apps/example/ios
run: |
SIMULATOR_ID="$(
xcrun simctl list devices available |
sed -n 's/^[[:space:]]*iPhone[^()]* (\([0-9A-F-][0-9A-F-]*\)) (.*/\1/p' |
head -n 1
)"
if [ -z "$SIMULATOR_ID" ]; then
echo "Unable to find an available iPhone simulator." >&2
exit 1
fi
xcodebuild \
-quiet \
-workspace RNHealthKit.xcworkspace \
-scheme RNHealthKit \
-configuration Debug \
-sdk iphonesimulator \
-destination "id=$SIMULATOR_ID" \
ONLY_ACTIVE_ARCH=YES \
COMPILER_INDEX_STORE_ENABLE=NO \
DEBUG_INFORMATION_FORMAT=dwarf \
build
- name: Run HealthKit contracts
run: bun run test:contracts