Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
marcaaron committed Jan 18, 2022
2 parents b1984f0 + cd8130f commit bdd4dc3
Show file tree
Hide file tree
Showing 74 changed files with 1,533 additions and 535 deletions.
18 changes: 13 additions & 5 deletions .github/actions/triggerWorkflowAndWait/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ const WORKFLOW_COMPLETION_TIMEOUT = 7200000;
*/
const POLL_RATE = 10000;

/**
* URL prefixed to a specific workflow run
* @type {string}
*/
const WORKFLOW_RUN_URL_PREFIX = 'https://github.com/Expensify/App/actions/runs/';

const run = function () {
const workflow = core.getInput('WORKFLOW', {required: true});
const inputs = ActionUtils.getJSONInput('INPUTS', {required: false}, {});
Expand All @@ -55,6 +61,7 @@ const run = function () {
// 4) Then we can poll and wait for that new workflow run to conclude
let previousWorkflowRunID;
let newWorkflowRunID;
let newWorkflowRunURL;
let hasNewWorkflowStarted = false;
let workflowCompleted = false;
return GithubUtils.getLatestWorkflowRunID(workflow)
Expand Down Expand Up @@ -89,6 +96,7 @@ const run = function () {
return GithubUtils.getLatestWorkflowRunID(workflow)
.then((lastWorkflowRunID) => {
newWorkflowRunID = lastWorkflowRunID;
newWorkflowRunURL = WORKFLOW_RUN_URL_PREFIX + newWorkflowRunID;
hasNewWorkflowStarted = newWorkflowRunID !== previousWorkflowRunID;

if (!hasNewWorkflowStarted) {
Expand All @@ -104,7 +112,7 @@ const run = function () {
process.exit(1);
}
} else {
console.log(`\n🚀 New ${workflow} run with ID ${newWorkflowRunID} has started`);
console.log(`\n🚀 New ${workflow} run ${newWorkflowRunURL} has started`);
}
})
.catch((err) => {
Expand All @@ -123,7 +131,7 @@ const run = function () {
() => !workflowCompleted && waitTimer < WORKFLOW_COMPLETION_TIMEOUT,
_.throttle(
() => {
console.log(`\n⏳ Waiting for workflow run ${newWorkflowRunID} to finish...`);
console.log(`\n⏳ Waiting for workflow run ${newWorkflowRunURL} to finish...`);
return GithubUtils.octokit.actions.getWorkflowRun({
owner: GithubUtils.GITHUB_OWNER,
repo: GithubUtils.EXPENSIFY_CASH_REPO,
Expand All @@ -134,18 +142,18 @@ const run = function () {
waitTimer += POLL_RATE;
if (waitTimer > WORKFLOW_COMPLETION_TIMEOUT) {
// eslint-disable-next-line max-len
const err = new Error(`After ${WORKFLOW_COMPLETION_TIMEOUT / 1000 / 60 / 60} hours, workflow ${newWorkflowRunID} did not complete.`);
const err = new Error(`After ${WORKFLOW_COMPLETION_TIMEOUT / 1000 / 60 / 60} hours, workflow ${newWorkflowRunURL} did not complete.`);
console.error(err);
core.setFailed(err);
process.exit(1);
}
if (workflowCompleted) {
if (data.conclusion === 'success') {
// eslint-disable-next-line max-len
console.log(`\n🎉 ${workflow} run ${newWorkflowRunID} completed successfully! 🎉`);
console.log(`\n🎉 ${workflow} run ${newWorkflowRunURL} completed successfully! 🎉`);
} else {
// eslint-disable-next-line max-len
const err = new Error(`🙅‍ ${workflow} run ${newWorkflowRunID} finished with conclusion ${data.conclusion}`);
const err = new Error(`🙅‍ ${workflow} run ${newWorkflowRunURL} finished with conclusion ${data.conclusion}`);
console.error(err.message);
core.setFailed(err);
process.exit(1);
Expand Down
18 changes: 13 additions & 5 deletions .github/actions/triggerWorkflowAndWait/triggerWorkflowAndWait.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ const WORKFLOW_COMPLETION_TIMEOUT = 7200000;
*/
const POLL_RATE = 10000;

/**
* URL prefixed to a specific workflow run
* @type {string}
*/
const WORKFLOW_RUN_URL_PREFIX = 'https://github.com/Expensify/App/actions/runs/';

const run = function () {
const workflow = core.getInput('WORKFLOW', {required: true});
const inputs = ActionUtils.getJSONInput('INPUTS', {required: false}, {});
Expand All @@ -45,6 +51,7 @@ const run = function () {
// 4) Then we can poll and wait for that new workflow run to conclude
let previousWorkflowRunID;
let newWorkflowRunID;
let newWorkflowRunURL;
let hasNewWorkflowStarted = false;
let workflowCompleted = false;
return GithubUtils.getLatestWorkflowRunID(workflow)
Expand Down Expand Up @@ -79,6 +86,7 @@ const run = function () {
return GithubUtils.getLatestWorkflowRunID(workflow)
.then((lastWorkflowRunID) => {
newWorkflowRunID = lastWorkflowRunID;
newWorkflowRunURL = WORKFLOW_RUN_URL_PREFIX + newWorkflowRunID;
hasNewWorkflowStarted = newWorkflowRunID !== previousWorkflowRunID;

if (!hasNewWorkflowStarted) {
Expand All @@ -94,7 +102,7 @@ const run = function () {
process.exit(1);
}
} else {
console.log(`\n🚀 New ${workflow} run with ID ${newWorkflowRunID} has started`);
console.log(`\n🚀 New ${workflow} run ${newWorkflowRunURL} has started`);
}
})
.catch((err) => {
Expand All @@ -113,7 +121,7 @@ const run = function () {
() => !workflowCompleted && waitTimer < WORKFLOW_COMPLETION_TIMEOUT,
_.throttle(
() => {
console.log(`\n⏳ Waiting for workflow run ${newWorkflowRunID} to finish...`);
console.log(`\n⏳ Waiting for workflow run ${newWorkflowRunURL} to finish...`);
return GithubUtils.octokit.actions.getWorkflowRun({
owner: GithubUtils.GITHUB_OWNER,
repo: GithubUtils.EXPENSIFY_CASH_REPO,
Expand All @@ -124,18 +132,18 @@ const run = function () {
waitTimer += POLL_RATE;
if (waitTimer > WORKFLOW_COMPLETION_TIMEOUT) {
// eslint-disable-next-line max-len
const err = new Error(`After ${WORKFLOW_COMPLETION_TIMEOUT / 1000 / 60 / 60} hours, workflow ${newWorkflowRunID} did not complete.`);
const err = new Error(`After ${WORKFLOW_COMPLETION_TIMEOUT / 1000 / 60 / 60} hours, workflow ${newWorkflowRunURL} did not complete.`);
console.error(err);
core.setFailed(err);
process.exit(1);
}
if (workflowCompleted) {
if (data.conclusion === 'success') {
// eslint-disable-next-line max-len
console.log(`\n🎉 ${workflow} run ${newWorkflowRunID} completed successfully! 🎉`);
console.log(`\n🎉 ${workflow} run ${newWorkflowRunURL} completed successfully! 🎉`);
} else {
// eslint-disable-next-line max-len
const err = new Error(`🙅‍ ${workflow} run ${newWorkflowRunID} finished with conclusion ${data.conclusion}`);
const err = new Error(`🙅‍ ${workflow} run ${newWorkflowRunURL} finished with conclusion ${data.conclusion}`);
console.error(err.message);
core.setFailed(err);
process.exit(1);
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ jobs:
steps:
- uses: actions/checkout@v2

# If automatic signing is enabled, iOS builds will fail, so ensure we always have the proper profile specified
- name: Check Provisioning Style
run: |
if grep -q 'PROVISIONING_PROFILE_SPECIFIER = chat_expensify_appstore' ios/NewExpensify.xcodeproj/project.pbxproj; then
exit 0
else
echo "Error: Automatic provisioning style is not allowed!"
exit 1
fi
- name: Use Node.js
uses: actions/setup-node@v1
with:
Expand Down
28 changes: 28 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1 +1,29 @@
import React from 'react';
import Onyx from 'react-native-onyx';
import '../assets/css/fonts.css';
import ComposeProviders from '../src/components/ComposeProviders';
import OnyxProvider from '../src/components/OnyxProvider';
import {LocaleContextProvider} from '../src/components/withLocalize';
import ONYXKEYS from '../src/ONYXKEYS';

Onyx.init({
keys: ONYXKEYS,
});

const decorators = [
Story => (
<ComposeProviders
components={[
OnyxProvider,
LocaleContextProvider,
]}
>
<Story />
</ComposeProviders>
),
];

export {
// eslint-disable-next-line import/prefer-default-export
decorators,
};
9 changes: 0 additions & 9 deletions __mocks__/react-native-geolocation-service.js

This file was deleted.

9 changes: 6 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,18 @@ android {
pickFirst 'lib/arm64-v8a/libc++_shared.so'
pickFirst 'lib/x86_64/libc++_shared.so'
pickFirst 'lib/armeabi-v7a/libc++_shared.so'

// Exclude generated files from APK, to fix 'More than one file was found with path' error
exclude 'META-INF/*'
}

defaultConfig {
applicationId "com.expensify.chat"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001012905
versionName "1.1.29-5"
versionCode 1001013003
versionName "1.1.30-3"
}
splits {
abi {
Expand Down Expand Up @@ -236,7 +239,7 @@ dependencies {
implementation jscFlavor
}

implementation platform("com.google.firebase:firebase-bom:20.0.2")
implementation platform("com.google.firebase:firebase-bom:29.0.3")
implementation "com.google.firebase:firebase-perf"

// GIF support
Expand Down
Loading

0 comments on commit bdd4dc3

Please sign in to comment.