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
11 changes: 11 additions & 0 deletions .github/actions/detect-platform-change/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,14 @@ runs:
ios: [ ${{ inputs.ios-paths }}, ${{ inputs.shared-ignores }} ]
android: [ ${{ inputs.android-paths }}, ${{ inputs.shared-ignores }} ]
common: [ ${{ inputs.common-paths }}, ${{ inputs.shared-ignores }} ]
- name: 📋 Print detection summary
shell: bash
run: |
echo "### Platform detection results"
echo ""
echo "**iOS-specific changed files:** ${{ steps.changes.outputs.ios_all_changed_files || '(none)' }}"
echo "**Android-specific changed files:** ${{ steps.changes.outputs.android_all_changed_files || '(none)' }}"
echo "**Common changed files:** ${{ steps.changes.outputs.common_all_changed_files || '(none)' }}"
echo ""
echo "**should_run_ios:** ${{ steps.changes.outputs.ios_any_changed == 'true' || steps.changes.outputs.common_any_changed == 'true' }}"
echo "**should_run_android:** ${{ steps.changes.outputs.android_any_changed == 'true' || steps.changes.outputs.common_any_changed == 'true' }}"
6 changes: 6 additions & 0 deletions .github/workflows/android-instrumentation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ on:
- tools/src/commands/AndroidNativeUnitTests.ts
- yarn.lock
- '!packages/@expo/cli/**'
- '!**.md'
- '!**/__tests__/**'
- '!**/__mocks__/**'
pull_request:
paths:
- .github/workflows/android-instrumentation-tests.yml
Expand All @@ -33,6 +36,9 @@ on:
- tools/src/commands/AndroidNativeUnitTests.ts
- yarn.lock
- '!packages/@expo/cli/**'
- '!**.md'
- '!**/__tests__/**'
- '!**/__mocks__/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/brownfield.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ on:
- packages/expo-updates/**
- yarn.lock
- '!**.md'
- '!**/__tests__/**'
- '!**/__mocks__/**'
pull_request:
paths:
- .github/workflows/brownfield.yml
Expand All @@ -25,6 +27,8 @@ on:
- packages/expo-updates/**
- yarn.lock
- '!**.md'
- '!**/__tests__/**'
- '!**/__mocks__/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test-suite-brownfield-isolated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@ on:
- .github/workflows/test-suite-brownfield-isolated.yml
- apps/brownfield-tester/expo-app/**
- packages/expo-brownfield/**
- '!**.md'
- '!**/__tests__/**'
- '!**/__mocks__/**'
pull_request:
paths:
- .github/workflows/test-suite-brownfield-isolated.yml
- apps/brownfield-tester/expo-app/**
- packages/expo-brownfield/**
- '!**.md'
- '!**/__tests__/**'
- '!**/__mocks__/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-suite-brownfield.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
- packages/expo-modules-core/**
- packages/expo-dev-client/**
- packages/expo-updates/**
- '!**.md'
- '!**/__tests__/**'
- '!**/__mocks__/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-suite-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ on:
- '!**/.gitattributes'
- '!**/.watchmanconfig'
- '!**/.fingerprintignore'
- '!**/__tests__/**'
- '!**/__mocks__/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
Expand Down
95 changes: 82 additions & 13 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,48 @@ on:
push:
branches: [main, 'sdk-*']
paths:
- .github/actions/detect-platform-change/action.yml
- .github/workflows/test-suite.yml
- .github/actions/use-android-emulator/action.yml
- apps/bare-expo/**
- apps/test-suite/**
- packages/**
- yarn.lock
# When adding new paths, also update the paths of the "Get the base commit" step below
- '!packages/@expo/cli/**'
- '!**.md'
- '!**/__tests__/**'
- '!**/__mocks__/**'
pull_request:
paths:
- .github/actions/detect-platform-change/action.yml
- .github/workflows/test-suite.yml
- .github/actions/use-android-emulator/action.yml
- apps/bare-expo/**
- apps/test-suite/**
- packages/**
- yarn.lock
# Ignore Expo CLI for now...
- '!packages/@expo/cli/**'
- '!**.md'
- '!**/__tests__/**'
- '!**/__mocks__/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true

jobs:
detect-platform-for-e2e:
detect-platform-changes:
runs-on: ubuntu-24.04
outputs:
should_run_ios: ${{ steps.changes.outputs.should_run_ios }}
should_run_android: ${{ steps.changes.outputs.should_run_android }}
should_build_ios: ${{ steps.build.outputs.should_run_ios }}
should_build_android: ${{ steps.build.outputs.should_run_android }}
should_test_ios: ${{ steps.e2e.outputs.should_run_ios }}
should_test_android: ${{ steps.e2e.outputs.should_run_android }}
steps:
- name: 👀 Checkout
uses: actions/checkout@v5
- name: 🧐 Detect platform change
id: changes
- name: 🧐 Detect build-relevant platform changes
id: build
uses: ./.github/actions/detect-platform-change
with:
android-paths: >-
Expand All @@ -57,10 +66,68 @@ jobs:
yarn.lock,
"!packages/**/{ios,android}/**",
"!apps/bare-expo/**/{ios,android}/**"

- name: 🧐 Detect e2e-test relevant platform changes
id: e2e
uses: ./.github/actions/detect-platform-change
with:
android-paths: >-
"packages/expo-modules-core/**/android/**",
"packages/expo-modules-autolinking/**/android/**",
"packages/expo/**/android/**",
"packages/expo-constants/**/android/**",
"packages/expo-crypto/**/android/**",
"packages/expo-file-system/**/android/**",
"packages/expo-haptics/**/android/**",
"packages/expo-image/**/android/**",
"packages/expo-keep-awake/**/android/**",
"packages/expo-linear-gradient/**/android/**",
"packages/expo-localization/**/android/**",
"packages/expo-sqlite/**/android/**",
"packages/expo-video/**/android/**",
"apps/bare-expo/**/android/**"

ios-paths: >-
"packages/expo-modules-core/**/ios/**",
"packages/expo-modules-autolinking/**/ios/**",
"packages/expo/**/ios/**",
"packages/expo-constants/**/ios/**",
"packages/expo-crypto/**/ios/**",
"packages/expo-file-system/**/ios/**",
"packages/expo-haptics/**/ios/**",
"packages/expo-image/**/ios/**",
"packages/expo-keep-awake/**/ios/**",
"packages/expo-linear-gradient/**/ios/**",
"packages/expo-localization/**/ios/**",
"packages/expo-sqlite/**/ios/**",
"packages/expo-video/**/ios/**",
"apps/bare-expo/**/ios/**"

common-paths: >-
.github/workflows/test-suite.yml,
.github/actions/use-android-emulator/action.yml,
"apps/bare-expo/**",
"apps/test-suite/**",
"packages/expo-modules-core/**",
"packages/expo-modules-autolinking/**",
"packages/expo/**",
"packages/expo-constants/**",
"packages/expo-crypto/**",
"packages/expo-file-system/**",
"packages/expo-haptics/**",
"packages/expo-image/**",
"packages/expo-keep-awake/**",
"packages/expo-linear-gradient/**",
"packages/expo-localization/**",
"packages/expo-sqlite/**",
"packages/expo-video/**",
yarn.lock,
"!packages/**/{ios,android}/**",
"!apps/bare-expo/**/{ios,android}/**"
ios-build:
runs-on: macos-15
needs: detect-platform-for-e2e
if: needs.detect-platform-for-e2e.outputs.should_run_ios == 'true'
needs: detect-platform-changes
if: needs.detect-platform-changes.outputs.should_build_ios == 'true'
permissions:
# REQUIRED: Allow updating fingerprint in action caches
actions: write
Expand Down Expand Up @@ -147,7 +214,8 @@ jobs:
author_name: Test Suite e2e (iOS)

ios-test-e2e:
needs: ios-build
needs: [ios-build, detect-platform-changes]
if: needs.detect-platform-changes.outputs.should_test_ios == 'true'
runs-on: macos-15
steps:
- name: 👀 Checkout
Expand Down Expand Up @@ -248,8 +316,8 @@ jobs:

android-build:
runs-on: ubuntu-24.04
needs: detect-platform-for-e2e
if: needs.detect-platform-for-e2e.outputs.should_run_android == 'true'
needs: detect-platform-changes
if: needs.detect-platform-changes.outputs.should_build_android == 'true'
permissions:
# REQUIRED: Allow updating fingerprint in action caches
actions: write
Expand Down Expand Up @@ -333,7 +401,8 @@ jobs:
author_name: Test Suite e2e (Android)

android-test-e2e:
needs: android-build
needs: [android-build, detect-platform-changes]
if: needs.detect-platform-changes.outputs.should_test_android == 'true'
runs-on: ubuntu-24.04
strategy:
matrix:
Expand Down
1 change: 1 addition & 0 deletions apps/bare-expo/e2e/TestSuite-test.native.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* The test cases for bare-expo E2E testing.
* When adding or removing tests, also update the paths in .github/workflows/test-suite.yml
*/
const TESTS = [
'Basic',
Expand Down
48 changes: 40 additions & 8 deletions apps/native-component-list/src/api/sendPushNotificationsAsync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,49 @@ export async function sendPushNotificationsAsync({
}
}

const receipts = result.data;
if (receipts) {
const receipt = receipts[0];
if (receipt.status === 'error') {
if (receipt.details) {
const tickets = result.data;
if (tickets) {
const ticket = tickets[0];
if (ticket.status === 'error') {
if (ticket.details) {
console.warn(
`Expo push service reported an error sending a notification: ${receipt.details.error}`
`Expo push service reported an error accepting a notification: ${ticket.details.error}`
);
}
if (receipt.__debug) {
console.warn(receipt.__debug);
if (ticket.__debug) {
console.warn(ticket.__debug);
}
}
}

// Check push receipts after a delay to confirm delivery
const receiptIds = (tickets ?? [])
.filter((ticket: { status: string; id?: string }) => ticket.status === 'ok')
.map((ticket: { id: string }) => ticket.id);

if (receiptIds.length > 0) {
await new Promise((resolve) => setTimeout(resolve, 2000));

const receiptResponse = await fetch(PUSH_ENDPOINT.replace('/send', '/getReceipts'), {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ ids: receiptIds }),
});

const receiptResult = await receiptResponse.json();
console.log({ receipts: JSON.stringify(receiptResult, null, 2) });

if (receiptResult.data) {
for (const [id, receipt] of Object.entries(receiptResult.data) as [string, any][]) {
if (receipt.status === 'error') {
console.warn(`Receipt ${id} error: ${receipt.message}`);
if (receipt.details?.error) {
console.warn(`Error code: ${receipt.details.error}`);
}
}
}
}
}
Expand Down

This file was deleted.

Loading
Loading