Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
russellwheatley authored Aug 14, 2024
2 parents bbf939f + f978d86 commit f01d708
Show file tree
Hide file tree
Showing 373 changed files with 26,989 additions and 8,455 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: "⚠️ Bug/Issue report - React Native"
about: Please provide as much detail as possible. Issues may be closed if they do
not follow the template.
title: "[\U0001F41B] Bug Report Title - CHANGE ME "
labels: 'Help: Needs Triage, Impact: Bug'
labels: 'Help: Needs Triage, Needs Attention, type: bug'
assignees: ''

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Documentation_issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: "\U0001F4D6 Documentation Feedback"
about: Report an issue with the documentation or suggest an improvement.
title: "[\U0001F4DA] Documentation Issue Title - CHANGE ME "
labels: 'Help: Good First Issue, Type: Docs'
labels: 'Help: Good First Issue, type: documentation'
assignees: ''

---
Expand Down
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: "🚀Feature Request"
about: Make a feature request for React Native Firebase.
title: "\U0001F41B [PACKAGE_NAME_HERE] Your feature request title here"
labels: 'Needs Attention, type: enhancement'
assignees: ''

---

## What feature would you like to see?

Is there a missing a feature that is supported on an underlying SDK? Or is there a feature that you think would be useful to have in React Native Firebase?
63 changes: 63 additions & 0 deletions .github/ISSUE_TEMPLATE/Other_platforms_bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: '⚠️ Other Platforms - Bug/Issue report'
title: "[\U0001F41B] Other Platforms Bug Report Title - CHANGE ME "
labels:
- 'Help: Needs Triage'
- 'type: bug'
- 'platform: macOS (Other)'
description: Create an issue specific to 'Other' platforms on React Native Firebase (not Android or iOS).
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: |
Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues.
required: true

- type: checkboxes
attributes:
label: Please confirm you are aware of the 'Other' platform limitations.
description: |
Please see our [Other Platforms](https://rnfirebase.io/platforms) documentation for more information.
options:
- label: I confirm that issue is not relating to a known platform limitation.
required: true

- type: checkboxes
attributes:
label: Please confirm, this issue is NOT for Android or iOS?
description: |
This issue template is specifically for issues relating to the 'Other' platforms as defined in our [Other Platforms](https://rnfirebase.io/platforms) documentation.
options:
- label: I confirm that this issue is not for Android and not for iOS.
required: true

- type: markdown
attributes:
value: |
---
- type: textarea
attributes:
label: Please describe your issue here.
description: |
Please provide as much detail as possible on your issue here,
include which Firebase module you are using, which React Native version you are using,
what version of React Native Firebase you are using, and any other relevant information.
**Make sure to remove any sensitive information from your issue before submitting it.**
validations:
required: true

- type: markdown
attributes:
value: |
---
- type: textarea
id: comments
attributes:
label: Additional context and comments
description: |
Anything else you want to add for this issue?
36 changes: 36 additions & 0 deletions .github/workflows/issue-labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Update labels on issues with OP response

on:
issue_comment:
types: [created]

jobs:
label-op-response:
runs-on: ubuntu-latest
steps:
- name: Check if the comment is from the OP
id: check-op
run: |
OP=${{ github.event.issue.user.login }}
COMMENTER=${{ github.event.comment.user.login }}
if [ "$OP" = "$COMMENTER" ]; then
echo "op_comment=true" >> $GITHUB_ENV
else
echo "op_comment=false" >> $GITHUB_ENV
fi
- name: Add 'Needs Attention' label if OP responded
if: env.op_comment == 'true'
uses: actions-ecosystem/action-add-labels@v1
with:
labels: 'Needs Attention'
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Remove 'blocked customer-response' label if OP responded
if: env.op_comment == 'true'
uses: actions-ecosystem/action-remove-labels@v1
with:
labels: 'blocked: customer-response'
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
10 changes: 0 additions & 10 deletions .github/workflows/scripts/adb_all_emulators.sh

This file was deleted.

8 changes: 3 additions & 5 deletions .github/workflows/scripts/firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
"indexes": "firestore.indexes.json"
},
"functions": {
"predeploy": [
"cd functions && yarn",
"cd functions && yarn --prefix \"$RESOURCE_DIR\" build"
],
"source": "functions"
"predeploy": ["cd functions && yarn", "cd functions && yarn --prefix \"$RESOURCE_DIR\" build"],
"source": "functions",
"ignore": [".yarn", "yarn.lock", "*.log", "node_modules"]
},
"database": {
"rules": "database.rules"
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/scripts/firestore.indexes.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
{
"fieldPath": "b",
"order": "ASCENDING"
},
{
"fieldPath": "foo.bar",
"order": "ASCENDING"
},
{
"fieldPath": "baz",
"order": "ASCENDING"
}
]
}
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/scripts/firestore.rules
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ service cloud.firestore {
}
match /firestore/{document=**} {
allow read, write: if true;
}
}
match /{path=**}/collectionGroup/{documentId} {
allow read, write: if true;
}
}
match /second-database/{document=**} {
// separate rules are not supported so we need to use the same rules for both databases to prove it is querying different databases
allow read, write: if database == "second-rnfb";
}
}
}
}
19 changes: 19 additions & 0 deletions .github/workflows/scripts/functions/src/fetchAppCheckToken.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
*
* Testing tools for invertase/react-native-firebase use only.
*
* Copyright (C) 2018-present Invertase Limited <oss@invertase.io>
*
* See License file for more information.
*/

import * as admin from 'firebase-admin';
import * as functions from 'firebase-functions';

// Note: this will only work in a live environment, not locally via the Firebase emulator.
export const fetchAppCheckToken = functions.https.onCall(async data => {
const { appId } = data;
const expireTimeMillis = Math.floor(Date.now() / 1000) + 60 * 60;
const result = await admin.appCheck().createToken(appId);
return { ...result, expireTimeMillis };
});
1 change: 1 addition & 0 deletions .github/workflows/scripts/functions/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ export const sleeper = functions.https.onCall(async data => {
export { testFunctionCustomRegion } from './testFunctionCustomRegion';
export { testFunctionDefaultRegion } from './testFunctionDefaultRegion';
export { testFunctionRemoteConfigUpdate } from './testFunctionRemoteConfigUpdate';
export { fetchAppCheckToken } from './fetchAppCheckToken';
8 changes: 7 additions & 1 deletion .github/workflows/scripts/storage.rules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /b/react-native-firebase-testing.appspot.com/o {
match /{document=**} {
allow read, write: if false;
}
Expand All @@ -18,4 +18,10 @@ service firebase.storage {
allow read, write: if true;
}
}

match /b/react-native-firebase-testing/o {
match /only-second-bucket/{document=**} {
allow read, write: if true;
}
}
}
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ jobs:
close-issue-reason: not_planned
days-before-stale: 28
days-before-close: 15
stale-issue-label: 'Type: Stale'
stale-issue-label: 'Stale'
35 changes: 8 additions & 27 deletions .github/workflows/tests_e2e_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ concurrency:
jobs:
android:
name: Android
runs-on: ubuntu-latest
timeout-minutes: 90
runs-on: ubuntu-latest-l
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
Expand All @@ -46,20 +46,7 @@ jobs:
iteration: [0]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
EMULATOR_COMMAND: "-avd TestingAVD -noaudio -gpu swiftshader_indirect -camera-back none -no-snapshot -no-window -no-boot-anim -nojni -memory 2048 -timezone 'Europe/London' -cores 2"
EMULATOR_EXECUTABLE: qemu-system-x86_64-headless
steps:
- name: Liberate disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: false
dotnet: true
haskell: true
large-packages: false
docker-images: true
swap-storage: false

- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
Expand Down Expand Up @@ -88,13 +75,13 @@ jobs:
echo "metro-cache=$HOME/.metro" >> $GITHUB_OUTPUT
echo "tempdir=$TMPDIR" >> $GITHUB_OUTPUT
- uses: actions/cache/restore@v4
name: Yarn Cache Restore
- uses: actions/cache@v4
name: Yarn Cache
id: yarn-cache
with:
path: .yarn/cache
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-v1
key: ${{ runner.os }}-android-yarn-v1-${{ hashFiles('yarn.lock') }}
restore-keys: ${{ runner.os }}-android-yarn-v1

- name: Yarn Install
uses: nick-fields/retry@v3
Expand Down Expand Up @@ -158,11 +145,12 @@ jobs:

- name: Detox Tests
uses: reactivecircus/android-emulator-runner@v2
timeout-minutes: 60
timeout-minutes: 45
with:
api-level: ${{ matrix.api-level }}
avd-name: TestingAVD
target: ${{ matrix.target }}
disable-spellchecker: true
arch: ${{ matrix.arch }}
pre-emulator-launch-script: |
sudo mkdir /mnt/avd
Expand All @@ -179,13 +167,6 @@ jobs:
with:
verbose: true

- uses: actions/cache/save@v4
name: Yarn Cache Save
if: "${{ github.ref == 'refs/heads/main' }}"
with:
path: .yarn/cache
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }}

- name: Upload Emulator Log
uses: actions/upload-artifact@v4
if: always()
Expand Down
Loading

0 comments on commit f01d708

Please sign in to comment.