-
Notifications
You must be signed in to change notification settings - Fork 80
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
Showing
84 changed files
with
2,873 additions
and
959 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,49 @@ | ||
name: pia_vpn_ios | ||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
concurrency: | ||
group: "${{ github.ref }}" | ||
cancel-in-progress: true | ||
jobs: | ||
build: | ||
runs-on: macos-13 | ||
env: | ||
TEST_RUNNER_PIA_TEST_USER: ${{ secrets.PIA_ACCOUNT_USERNAME}} | ||
TEST_RUNNER_PIA_TEST_PASSWORD: ${{ secrets.PIA_ACCOUNT_PASSWORD }} | ||
|
||
steps: | ||
- name: Setup Git credentials | ||
run: | | ||
git config --global url."https://${{ secrets.ORG_GITHUB_USERNAME }}:${{ secrets.ORG_GITHUB_TOKEN }}@github.com/".insteadOf "[email protected]:" | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7 | ||
|
||
- name: Install Fastlane | ||
run: gem install fastlane | ||
|
||
- name: Set credentials in fastlane env | ||
run: echo "TEST_RUNNER_PIA_TEST_USER=${{ secrets.PIA_ACCOUNT_USERNAME}}"\n"TEST_RUNNER_PIA_TEST_PASSWORD=${{ secrets.PIA_ACCOUNT_PASSWORD }}" > fastlane/.env | ||
|
||
- name: Check fastlane env | ||
run: cat fastlane/.env | ||
|
||
- name: Select XCode version | ||
run: sudo xcode-select -s /Applications/Xcode_15.0.app | ||
|
||
- name: Install dependencies | ||
run: swift package resolve | ||
|
||
- name: Run e2e tests with fastlane | ||
run: bundle exec fastlane e2e_tests | ||
continue-on-error: true | ||
|
||
- name: Run tests | ||
run: bundle exec fastlane tests | ||
|
||
|
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: testflight_deploy | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
workflow_dispatch: | ||
concurrency: | ||
group: "${{ github.ref }}" | ||
cancel-in-progress: true | ||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
env: | ||
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }} | ||
KEYCHAIN_NAME: ${{ secrets.KEYCHAIN_NAME }} | ||
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} | ||
APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }} | ||
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} | ||
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }} | ||
|
||
steps: | ||
- name: Setup Git credentials | ||
run: | | ||
git config --global url."https://${{ secrets.ORG_GITHUB_USERNAME }}:${{ secrets.ORG_GITHUB_TOKEN }}@github.com/".insteadOf "[email protected]:" | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7 | ||
|
||
- name: Install Fastlane | ||
run: gem install fastlane | ||
|
||
- name: Decode Certificates | ||
run: echo "${{ secrets.IOS_CERTIFICATE }}" | base64 --decode > ./fastlane/Certificate.p12 | ||
|
||
- name: Run tests | ||
run: bundle exec fastlane tests | ||
|
||
- name: Set up certificates and profiles | ||
run: bundle exec fastlane get_profiles > /dev/null 2>&1 | ||
|
||
- name: Upload version to TestFlight | ||
run: bundle exec fastlane testflight_build | ||
|
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 @@ | ||
source "https://rubygems.org" | ||
|
||
gem "fastlane" |
Large diffs are not rendered by default.
Oops, something went wrong.
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
100 changes: 100 additions & 0 deletions
100
PIA VPN.xcodeproj/xcshareddata/xcschemes/PIA-VPN_E2E_Tests.xcscheme
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,100 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1430" | ||
version = "2.2"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "NO" | ||
buildForProfiling = "NO" | ||
buildForArchiving = "NO" | ||
buildForAnalyzing = "NO"> | ||
<AutocreatedTestPlanReference> | ||
</AutocreatedTestPlanReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES"> | ||
<TestPlans> | ||
<TestPlanReference | ||
reference = "container:PIA-VPN_E2E_Tests/PIA-VPN-e2e-simulator.xctestplan" | ||
default = "YES"> | ||
</TestPlanReference> | ||
</TestPlans> | ||
<Testables> | ||
<TestableReference | ||
skipped = "NO"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "69B70AAF2ACBF51C0072A09D" | ||
BuildableName = "PIA-VPN_E2E_Tests.xctest" | ||
BlueprintName = "PIA-VPN_E2E_Tests" | ||
ReferencedContainer = "container:PIA VPN.xcodeproj"> | ||
</BuildableReference> | ||
</TestableReference> | ||
</Testables> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
<BuildableProductRunnable | ||
runnableDebuggingMode = "0"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "0EE2200B1F4EF307002805AE" | ||
BuildableName = "PIA VPN dev.app" | ||
BlueprintName = "PIA VPN dev" | ||
ReferencedContainer = "container:PIA VPN.xcodeproj"> | ||
</BuildableReference> | ||
</BuildableProductRunnable> | ||
<EnvironmentVariables> | ||
<EnvironmentVariable | ||
key = "PIA_TEST_USER" | ||
value = "xxx" | ||
isEnabled = "YES"> | ||
</EnvironmentVariable> | ||
<EnvironmentVariable | ||
key = "PIA_TEST_PASSWORD" | ||
value = "xxx" | ||
isEnabled = "YES"> | ||
</EnvironmentVariable> | ||
</EnvironmentVariables> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "0EE2200B1F4EF307002805AE" | ||
BuildableName = "PIA VPN dev.app" | ||
BlueprintName = "PIA VPN dev" | ||
ReferencedContainer = "container:PIA VPN.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
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 @@ | ||
|
||
import Foundation | ||
|
||
public struct AccessibilityId { | ||
public struct VPNPermission { | ||
public static let screen = "id.vpnPermission.screen" | ||
public static let submit = "id.vpnPermission.ok.button" | ||
} | ||
|
||
public struct Dashboard { | ||
public static let connectionButton = "id.dashboard.connection.button" | ||
} | ||
|
||
} | ||
|
||
|
||
/// This is the same struct `Accessibility` from `PIALibrary` | ||
/// It has been copied over to the VPN ios client app to | ||
/// facilitate e2e testing. | ||
/// In the future, we will move the Welcome and Login ViewControllers and storyboards from `PIALibrary` into vpn ios | ||
/// And this duplication will not be necessary | ||
public struct PIALibraryAccessibility { | ||
public struct Id { | ||
public struct Welcome { | ||
public static let environment = "id.welcome.environment" | ||
} | ||
public struct Login { | ||
public static let submit = "id.login.submit" | ||
public static let submitNew = "id.login.submit.new" | ||
public static let username = "id.login.username" | ||
public static let password = "id.login.submit" | ||
public struct Error { | ||
public static let banner = "id.login.error.banner" | ||
} | ||
} | ||
|
||
public struct Dashboard { | ||
public static let menu = "id.dashboard.menu" | ||
} | ||
public struct Menu { | ||
public static let logout = "id.menu.logout" | ||
} | ||
public struct Dialog { | ||
public static let destructive = "id.dialog.destructive.button" | ||
} | ||
} | ||
} | ||
|
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.