-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a47846c
commit 5d4cee1
Showing
10 changed files
with
706 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: npm | ||
directory: '/' | ||
schedule: | ||
interval: daily | ||
time: '21:00' | ||
open-pull-requests-limit: 10 | ||
ignore: | ||
- dependency-name: typeorm | ||
versions: | ||
- '> 0.2.24' | ||
- '< 0.3' | ||
reviewers: | ||
- 'theappnest/backend' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Git Checks | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
name: Run tests, linter, TS | ||
runs-on: macOS-latest | ||
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
|
||
- name: Install dependencies | ||
run: yarn | ||
|
||
- name: Pod Install | ||
working-directory: ios | ||
run: pod install | ||
|
||
# TS | ||
- name: Run TypeScript | ||
run: yarn tsc | ||
|
||
# Run linter | ||
- name: Run linter | ||
run: yarn lint | ||
|
||
# Run Prettier | ||
- name: Run prettier | ||
run: yarn prettier | ||
|
||
# Tests | ||
- name: Run unit tests | ||
run: yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: TypeScript '@ts-ignore' counter | ||
on: push | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Dump GitHub context | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
run: echo "$GITHUB_CONTEXT" | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: master | ||
- name: Count ts-ignore on master | ||
id: before | ||
run: | | ||
export BEFORE=`find . -type f \( -name "*.ts" -or -name "*.tsx" \) -exec grep -o "@ts-ignore" {} \; |wc -l` | ||
echo "::set-output name=count::$BEFORE" | ||
- uses: actions/checkout@v2 | ||
- name: Count ts-ignore on this commit | ||
id: after | ||
run: | | ||
export AFTER=`find . -type f \( -name "*.ts" -or -name "*.tsx" \) -exec grep -o "@ts-ignore" {} \; |wc -l` | ||
echo "::set-output name=count::$AFTER" | ||
- name: Do the math | ||
id: result | ||
run: | | ||
export BEFORE="${{ steps.before.outputs.count }}" | ||
export AFTER="${{ steps.after.outputs.count }}" | ||
if [[ `expr $AFTER - $BEFORE` -gt 0 ]]; then | ||
export DIFF=`expr $AFTER - $BEFORE` | ||
export CHANGE="(went up by $DIFF) " | ||
for n in $(seq $DIFF); do export CHANGE="$CHANGE:broken_heart:"; done | ||
elif [[ `expr $BEFORE - $AFTER` -gt 0 ]]; then | ||
export DIFF=`expr $BEFORE - $AFTER` | ||
export CHANGE="(went down by $DIFF) " | ||
for n in $(seq $DIFF); do export CHANGE="$CHANGE:sparkles:"; done | ||
else | ||
export CHANGE="(unchanged)" | ||
fi | ||
echo "::set-output name=comment::**ts-ignore**'s: $AFTER $CHANGE" | ||
- name: Post issue comment | ||
run: | | ||
jq --arg msg "${{ steps.result.outputs.comment }}" -nc '{"body": $msg}' | \ | ||
curl -sL -X POST -d @- \ | ||
-H "Content-Type: application/json" \ | ||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
"https://api.github.com/repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/comments" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
module.exports = { | ||
getUserAgent: () => "TestUser/Agent", | ||
getManufacturer: () => "Apple", | ||
getDeviceId: () => "DeviceId", | ||
getSystemVersion: () => "10.0", | ||
getReadableVersion: () => "1.0.0.1", | ||
getApplicationName: () => "Mindful Chef (Dev)", | ||
isEmulator: () => true, | ||
isTablet: () => false, | ||
getModel: () => "Mock iPhone 12", | ||
getVersion: jest.fn(() => Promise.resolve("24.0")), | ||
getBundleId: jest.fn(() => Promise.resolve("com.mindfulchef.uat")), | ||
getBuildNumber: jest.fn(() => Promise.resolve("3.0.0")), | ||
getIpAddress: jest.fn(() => Promise.resolve("10.158.70.93")), | ||
getUniqueID: jest.fn(), | ||
getBrand: jest.fn(), | ||
getSystemName: jest.fn(), | ||
getDeviceName: jest.fn(), | ||
getDeviceLocale: jest.fn(), | ||
getDeviceCountry: jest.fn(), | ||
getTimezone: jest.fn(), | ||
is24Hour: jest.fn(), | ||
isPinOrFingerprintSet: jest.fn(), | ||
getAPILevel: jest.fn(), | ||
getInstanceID: jest.fn(), | ||
getPhoneNumber: jest.fn(), | ||
getFirstInstallTime: jest.fn(), | ||
getLastUpdateTime: jest.fn(), | ||
getSerialNumber: jest.fn(), | ||
getMACAddress: jest.fn(), | ||
getCarrier: jest.fn(), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
checkNotifications: () => true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,7 +72,7 @@ exports[`renders correctly 1`] = ` | |
] | ||
} | ||
> | ||
? | ||
| ||
</Text> | ||
</View> | ||
<Text | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
5d4cee1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ts-ignore's: 16 (unchanged)