diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..bbd48cd86 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +*.pbxproj merge=union +*.pbxproj filter=filter-credentials +"Slide for Reddit/Info.plist" filter=filter-credentials diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000..eb222b250 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,4 @@ +# These are supported funding model platforms + +github: [ccrama] #If any contributor wants to add themselves here, please let me know! +custom: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=56FKCCYLX7L72 diff --git a/.github/workflows/beta-automation.yml b/.github/workflows/beta-automation.yml new file mode 100644 index 000000000..8f5759cd1 --- /dev/null +++ b/.github/workflows/beta-automation.yml @@ -0,0 +1,94 @@ +name: CI + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + tags: + - beta-* + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: macOS-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - name: Force Xcode 12.0 + run: sudo xcode-select -switch /Applications/Xcode_12.0.app + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + # Install bundles if no cache + - name: Move to checked out directory + run: | + ls -la + cd $GITHUB_WORKSPACE + + # Use cached ruby bundles if available + - uses: actions/cache@v1 + id: cache-bundles + with: + path: vendor/bundle + key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-gem- + + # Install bundles if no cache + - name: Install bundles + if: steps.cache-bundles.outputs.cache-hit != 'true' + run: bundle install + + # Use cached pods if available + - uses: actions/cache@v2 + id: cache-pods + with: + path: Pods + key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} + restore-keys: | + ${{ runner.os }}-pods- + + # Install pods if no cache + - name: Install pods + if: steps.cache-pods.outputs.cache-hit != 'true' + run: pod install + + # Restore cached SwiftPM packages if available + - uses: actions/cache@v2 + with: + path: .build + key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} + restore-keys: | + ${{ runner.os }}-spm- + + # https://github.community/t/ios-code-signing-provisioning/16614/4 + # https://github.com/hashicorp/terraform-github-actions/issues/39 + - name: Setup SSH Keys and known_hosts for fastlane match + env: + PRIVATE_KEY: ${{ secrets.MATCH_DEPLOY_PRIVATE_KEY }} + # Copied from https://github.com/maddox/actions/blob/master/ssh/entrypoint.sh + run: | + echo Force SSH connection + git config --global --add url."git@github.com:".insteadOf "https://github.com/" + echo Setup Github credentials + git config --local user.email "actions@github.com" + git config --local user.name "GitHub Actions" + + SSH_PATH="$HOME/.ssh" + mkdir -p "$SSH_PATH" + touch "$SSH_PATH/known_hosts" + echo "$PRIVATE_KEY" > "$SSH_PATH/id_rsa" + chmod 700 "$SSH_PATH" + ssh-keyscan github.com >> ~/.ssh/known_hosts + chmod 600 "$SSH_PATH/known_hosts" + chmod 600 "$SSH_PATH/id_rsa" + eval $(ssh-agent) + ssh-add "$SSH_PATH/id_rsa" + + - name: Fastlane Action + run: bundle exec fastlane beta --verbose + env: + MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} diff --git a/.github/workflows/core_data_tests.yml b/.github/workflows/core_data_tests.yml new file mode 100644 index 000000000..86f33287b --- /dev/null +++ b/.github/workflows/core_data_tests.yml @@ -0,0 +1,33 @@ +name: CI +on: + pull_request: + branches: + - develop +jobs: + validate-and-test: + runs-on: macOS-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Cache RubyGems + uses: actions/cache@v1 + with: + path: vendor/bundle + key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: ${{ runner.os }}-gem- + - name: Cache Mint packages + uses: actions/cache@v1 + with: + path: ${{ env.MINT_PATH }} + key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }} + restore-keys: ${{ runner.os }}-mint- + - name: Install dependencies + run: sh ./bootstrap.sh + - name: Run code validation + run: bundle exec danger + env: + DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_TOKEN }} + - name: Run tests + run: bundle exec fastlane scan + env: + MINT_PATH: ${{ github.workspace }}/min diff --git a/.gitignore b/.gitignore index 6af354e6a..5ccf6f743 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,88 @@ +fastlane/report.xml +ProfilingArtifacts/ + # Xcode workspace user data -Slide\ for\ Reddit.xcworkspace/ -.DS_Store +# Slide\ for\ Reddit.xcworkspace/ +# .DS_Store +# Pods/* + + +# Created by https://www.gitignore.io/api/xcode,macos,cocoapods +# Edit at https://www.gitignore.io/?templates=xcode,macos,cocoapods + +### CocoaPods ### +## CocoaPods GitIgnore Template + +# CocoaPods - Only use to conserve bandwidth / Save time on Pushing +# - Also handy if you have a large number of dependant pods +# - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGNORE THE LOCK FILE Pods/ + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Xcode ### +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings +xcuserdata/ + +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) +*.xcscmblueprint +*.xccheckout + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) +build/ +DerivedData/ +*.moved-aside +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +*.ipa +*.dSYM.zip + +## Xcode Patch +*.xcodeproj/* +!*.xcodeproj/project.pbxproj +!*.xcodeproj/xcshareddata/ +!*.xcworkspace/contents.xcworkspacedata +/*.gcno + +Slide for Reddit.xcodeproj/xcuserdata/* + +### Xcode Patch ### +**/xcshareddata/WorkspaceSettings.xcsettings + +# End of https://www.gitignore.io/api/xcode,macos,cocoapods diff --git a/.idea/workspace.xml b/.idea/workspace.xml index ab0eadab1..8423616fc 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,10 +2,19 @@ - - - - + + + + + + + + + + + + +