Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

safe paths #17

Merged
merged 31 commits into from
Apr 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3be087e
Change Export directory path for iOS (#383)
tremblerz Apr 8, 2020
8a00e8a
Update android launcher icon (#386)
tstirrat Apr 8, 2020
4dc74c8
CI: Automatically Generating a GitHub Release with APK and AAB files …
vitorpamplona Apr 8, 2020
7a80407
Location saving at proper rate; disable bluetooth (#389)
kenpugsley Apr 8, 2020
b3e7ca6
v0.5.12 (#395)
vitorpamplona Apr 8, 2020
cd8048d
Speed up GitHub build actions with caching (#397)
tstirrat Apr 8, 2020
582cf5b
CI: Signing APK on Release Tag (#399)
vitorpamplona Apr 8, 2020
a93692d
[iOS] Rename app on screen to Safe Paths (#402)
tstirrat Apr 8, 2020
5c7e692
Version bump 0.9.0 (#404)
kenpugsley Apr 8, 2020
3cfe284
Add Settings view base snapshot test (#406)
tstirrat Apr 8, 2020
9c803f7
Update iOS icon (#409)
tstirrat Apr 9, 2020
0746465
[Android] White splashscreen with new logo (#405)
tstirrat Apr 9, 2020
77f6765
Small spelling fixes in README (#411)
forsythetony Apr 9, 2020
f554600
clean up BackgroundGeolocation configuration and start/stop (#412)
kenpugsley Apr 9, 2020
e392cec
Changes based on Mayo feedback (#414)
penrods Apr 9, 2020
0eec475
rev to v0.9.1 (#415)
kenpugsley Apr 9, 2020
d11577a
Build stability fixes and tweaks (#420)
tstirrat Apr 9, 2020
2509e11
Add helper for i18n extraction (#419)
tstirrat Apr 10, 2020
bf6c59a
iOS splash screen update (#417)
tstirrat Apr 10, 2020
c0c78e3
Rename repo urls in contributing docs (#424)
avances123 Apr 10, 2020
616e649
Add jest config to .eslintrc.json (#426)
Patrick-Erichsen Apr 10, 2020
ff7fd7a
Clean up unused styles and variables (#413)
NethravathiPuttraju Apr 10, 2020
03c3275
Extract some reused variables to consts (#393)
denispapakul Apr 10, 2020
19765e5
Fix i18n string extraction bug (#427)
tstirrat Apr 10, 2020
e56176a
Add a lint checker on PRs (#421)
tstirrat Apr 10, 2020
7464c33
Exact location distance calculation for intersect and backfill (#422)
kenpugsley Apr 10, 2020
7de7173
Rename workflows so they're clear in settings (#431)
tstirrat Apr 10, 2020
3ca44cd
Ignore auto-generated jetifier json file (#428)
tstirrat Apr 10, 2020
e0ab52a
Migrate intersection logic into background service (#378)
tremblerz Apr 11, 2020
aac05c6
Refine Exposure notification screen and minor errors (#436)
penrods Apr 11, 2020
d06d431
replace npm with yarn in dev setup scripts (#438)
efalkner Apr 11, 2020
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
20 changes: 8 additions & 12 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"extends": ["eslint:recommended", "plugin:react/recommended"],
"parser": "babel-eslint",
"plugins": [
"react",
Expand All @@ -22,17 +19,19 @@
"commonjs": true,
"es6": true,
"react-native/react-native": true,
"node": true
"node": true,
"jest": true
},
"settings": {
"react": {
"version": "detect"
}
},
"rules": { // 0 is for off, 1 is for warning, 2 is for error
"rules": {
// 0 is for off, 1 is for warning, 2 is for error
"eol-last": 2, // Require file to end with single newline
"no-constant-condition": 2, // Disallow use of constant expressions in conditions
"no-dupe-keys": 2, // Disallow Duplicate Keys
"no-dupe-keys": 2, // Disallow Duplicate Keys
"no-empty": 2, // Disallow Empty Block Statements
"no-extra-boolean-cast": 2, // Disallow Extra Boolean Casts
"no-prototype-builtins": 2, // Disallow use of Object.prototypes builtins directly
Expand All @@ -43,10 +42,7 @@
"no-useless-escape": 2, // Disallow unnecessary escape usage
"no-console": 0, // disallow the use of console
"no-var": 2, // require let or const instead of var
"strict": [
2,
"global"
], // require or disallow strict mode directives
"strict": [2, "global"], // require or disallow strict mode directives
"react-native/no-color-literals": 1, // Detect StyleSheet rules and inline styles containing color literals instead of variables
"react-native/no-inline-styles": 0, // For keeping styles away from the logic, we can switch it to 1 in future
"react-native/no-raw-text": 1, // This is to make sure everything is translated in the app
Expand All @@ -66,4 +62,4 @@
"react/react-in-jsx-scope": 2, // Prevent missing React when using JSX
"react/self-closing-comp": 2 // Prevent extra closing tags for components without children
}
}
}
36 changes: 0 additions & 36 deletions .github/workflows/build-android.yml

This file was deleted.

54 changes: 0 additions & 54 deletions .github/workflows/build-ios.yml

This file was deleted.

92 changes: 92 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Build

on:
push:
branches: [develop]
pull_request:
branches: [develop]

jobs:
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Cache node_modules/
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-cache-

- run: yarn --frozen-lockfile

- name: Cache gradle
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Increase max file watchers
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

- name: Bundle JS
run: npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/ --verbose

- name: Build APK (gradle)
run: ./gradlew assembleDebug --no-daemon
working-directory: ./android

- name: Upload APK
uses: actions/upload-artifact@v1
with:
name: Debug APK
path: android/app/build/outputs/apk/debug/app-debug.apk

build-ios:
runs-on: macOS-latest
steps:
- uses: actions/checkout@master

- name: Set XCode Version
run: sudo xcode-select -s /Applications/Xcode_11.app

- name: Cache node_modules/
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-cache-

- run: yarn --frozen-lockfile

- run: gem install cocoapods

- name: Cache CocoaPods
uses: actions/cache@v1
with:
path: ios/Pods
key: ${{ runner.OS }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.OS }}-pods-

- run: pod install --repo-update
working-directory: ./ios

- name: Bundle iOS JS
run: npx react-native bundle --dev false --entry-file index.js --bundle-output ios/main.jsbundle --platform ios --verbose
# - name: Build App
# # xcodebuild -workspace PrivateKit.xcworkspace -configuration Debug -scheme PrivateKit
# # xcodebuild -workspace PrivateKit.xcworkspace -scheme PrivateKit archive -archivePath PrivateKit.xcarchive -allowProvisioningUpdates
# # xcodebuild -exportArchive -archivePath ./PrivateKit.xcarchive -exportPath . -exportOptionsPlist PrivateKit/Info.plist
# run: xcodebuild -workspace PrivateKit.xcworkspace -scheme PrivateKit archive -archivePath PrivateKit.xcarchive -allowProvisioningUpdates
# working-directory: ./ios
# - name: Upload Artifact
# uses: actions/upload-artifact@v1
# with:
# name: Debug IPA
# path: ios/build/
93 changes: 93 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Create Release Assets

on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Cache node_modules/
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-cache-

- run: yarn --frozen-lockfile

- name: Setup kernel for react native, increase watchers for release versions.
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

- name: Cache gradle
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Build AAB
run: ./gradlew clean bundleRelease --stacktrace
working-directory: ./android

- name: Sign AAB
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: android/app/build/outputs/bundle/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}

- name: Build APK
run: ./gradlew assembleRelease --stacktrace --no-daemon
working-directory: ./android

- name: Sign APK
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: android/app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload APK Asset
id: upload-release-asset-apk
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: android/app/build/outputs/apk/release/app-release-unsigned-signed.apk
asset_name: app-release-${{ github.ref }}.apk
asset_content_type: application/zip

- name: Upload AAB Asset
id: upload-release-asset-aab
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: android/app/build/outputs/bundle/release/app.aab
asset_name: app-release-${{ github.ref }}.aab
asset_content_type: application/zip
25 changes: 25 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Lint

on:
push:
branches: [develop]
pull_request:
branches: [develop]

jobs:
diffs-pass-eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Cache node_modules/
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-cache-

- run: yarn --frozen-lockfile

- run: ./node_modules/.bin/lint-diff origin/develop
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit test
name: Test

on:
push:
Expand All @@ -7,15 +7,12 @@ on:
branches: [ develop ]

jobs:
build:
# strategy:
# matrix:
# node-version: [12, 13] # TODO

unit-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- run: node --version

- name: Cache node_modules/
Expand Down
Loading