Skip to content

Commit

Permalink
Merge branch 'master' into #1178-rewrite_scripts_to_kotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
adamfilipow92 committed Oct 27, 2020
2 parents c065c0b + ecd6c9c commit 0f2b328
Show file tree
Hide file tree
Showing 43 changed files with 1,701 additions and 152 deletions.
78 changes: 76 additions & 2 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,40 @@
name: integration-tests

on:
workflow_dispatch:
pull_request:
pull_request_review:
types: submitted

jobs:
integration-tests:
check_approve_count:
runs-on: ubuntu-latest
outputs:
approve_count: ${{ steps.reviews.outputs.approved }}
steps:
- name: Count approve count
id: reviews
run: |
export count=$(curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/flank/flank/pulls/${{github.event.number}}/reviews -s | grep -i -c '"state": "APPROVED"')
echo $count
echo "::set-output name=approved::${count}"
- name: Print current approve count
run: |
echo "Current Approve count ${{ steps.reviews.outputs.approved }}"
integration-tests-unix:
needs: [check_approve_count]
if: 'needs.check_approve_count.outputs.approve_count >= 2'
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: '${{ secrets.GITHUB_TOKEN }}'

- uses: actions/checkout@v2
with:
submodules: true
Expand Down Expand Up @@ -50,3 +75,52 @@ jobs:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
with:
arguments: "--info :integration_tests:test --tests IntegrationTests.shouldMatchIosSuccessExitCodeAndPattern -Dflank-path=../test_runner/build/libs/flank.jar -Dyml-path=./src/test/resources/flank_ios.yml"

integration-tests-windows:
needs: [check_approve_count]
if: 'needs.check_approve_count.outputs.approve_count >= 2'
runs-on: windows-2019
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v2
with:
submodules: true

- uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-2-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-2-gradle-
- name: Set GCLOUD_KEY for WINDOWS
shell: cmd
run: |
echo ${{ secrets.GCLOUD_KEY }} > gcloud_key.txt
- name: Gradle clean build
shell: cmd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HEAD_REF: ${{ github.ref }}
run: |
gradlew.bat clean build
- name: Prepare Google Service Account
shell: cmd
run: |
set GCLOUD_DIR="%HOMEPATH%/.config/gcloud/"
mkdir %GCLOUD_DIR%
echo certutil -decode gcloud_key.txt %GCLOUD_DIR%application_default_credentials.json
- name: Gradle Integration Tests Android
uses: eskatos/gradle-command-action@v1
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
with:
arguments: "--info :integration_tests:test --tests IntegrationTests.shouldMatchAndroidSuccessExitCodeAndPattern -Dflank-path=../test_runner/build/libs/flank.jar -Dyml-path=./src/test/resources/flank_android.yml"

52 changes: 0 additions & 52 deletions .github/workflows/windows-non-wsl-workflow.yml

This file was deleted.

19 changes: 17 additions & 2 deletions .github/workflows/wsl-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,23 @@ on:
workflow_dispatch:

jobs:
build:
# The type of runner that the job will run on
check_approve_count:
runs-on: ubuntu-latest
outputs:
approve_count: ${{ steps.reviews.outputs.approved }}
steps:
- name: Check pull request is approved
id: 'reviews'
uses: jrylan/github-action-reviews-counter@main
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'

- name: Print current approve count
run: echo "Current Approve count ${{ steps.reviews.outputs.approved }}"

integration-tests-wsl:
needs: [check_approve_count]
if: 'needs.check_approve_count.outputs.approve_count >= 2'
runs-on: windows-2019
defaults:
run:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ test_runner/flank/
local.properties
/report.json
results
xcuserdata/
7 changes: 6 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,19 @@ gcloud:
# locale: es_ES
# orientation: landscape


## A list of device-path=file-path pairs that specify the paths of the test device and the files you want pushed to the device prior to testing.
## Device paths should either be under the Media shared folder (e.g. prefixed with /private/var/mobile/Media) or
## within the documents directory of the filesystem of an app under test (e.g. /Documents). Device paths to app
## filesystems should be prefixed by the bundle ID and a colon. Source file paths may be in the local filesystem or in Google Cloud Storage (gs://…).
# other-files
# com.my.app:/Documents/file.txt: local/file.txt
# /private/var/mobile/Media/file.jpg: gs://bucket/file.jpg

## List of up to 100 additional IPAs to install, in addition to the one being directly tested.
## The path may be in the local filesystem or in Google Cloud Storage using gs:// notation.
# additional-ipas:
# - gs://bucket/additional.ipa
# - path/to/local/ipa/file.ipa

flank:
# -- FlankYml --
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@
DEVELOPMENT_TEAM = AD2V26JBWL;
ENABLE_TESTABILITY = YES;
INFOPLIST_FILE = EarlGreyExampleSwiftTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.gogoapps.earlgrey.samples.EarlGreySwiftTests;
PRODUCT_MODULE_NAME = EarlGreyExampleTestsSwift;
Expand All @@ -509,9 +509,9 @@
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = AD2V26JBWL;
DEVELOPMENT_TEAM = L2UF9MLSM6;
INFOPLIST_FILE = EarlGreyExampleSwiftTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.gogoapps.earlgrey.samples.EarlGreySwiftTests;
PRODUCT_MODULE_NAME = EarlGreyExampleTestsSwift;
Expand Down Expand Up @@ -559,7 +559,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_MODULE_NAME = EarlGreyExample;
Expand Down Expand Up @@ -600,7 +600,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_MODULE_NAME = EarlGreyExample;
PRODUCT_NAME = EarlGreyExample;
Expand All @@ -622,7 +622,7 @@
DEVELOPMENT_TEAM = AD2V26JBWL;
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
INFOPLIST_FILE = "$(SRCROOT)/EarlGreyExample/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.gogoapps.earlgrey.samples.EarlGrey;
PRODUCT_MODULE_NAME = EarlGreyExampleSwift;
Expand All @@ -642,10 +642,10 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = AD2V26JBWL;
DEVELOPMENT_TEAM = L2UF9MLSM6;
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
INFOPLIST_FILE = "$(SRCROOT)/EarlGreyExample/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.gogoapps.earlgrey.samples.EarlGrey;
PRODUCT_MODULE_NAME = EarlGreyExampleSwift;
Expand Down Expand Up @@ -680,7 +680,7 @@
$CONFIGURATION_TEMP_DIR/EarlGreyExampleSwift.build/DerivedSources,
);
INFOPLIST_FILE = EarlGreyExample/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.gogoapps.earlgrey.samples.EarlGreyTests;
PRODUCT_MODULE_NAME = EarlGreyExampleTests;
Expand All @@ -704,7 +704,7 @@
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = AD2V26JBWL;
DEVELOPMENT_TEAM = L2UF9MLSM6;
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
HEADER_SEARCH_PATHS = (
Expand All @@ -714,7 +714,7 @@
$CONFIGURATION_TEMP_DIR/EarlGreyExampleSwift.build/DerivedSources,
);
INFOPLIST_FILE = EarlGreyExample/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.gogoapps.earlgrey.samples.EarlGreyTests;
PRODUCT_MODULE_NAME = EarlGreyExampleTests;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import EarlGrey
import Foundation

public func GREYAssert(_ expression: @autoclosure () -> Bool, reason: String) {
GREYAssert(expression, reason, details: "Expected expression to be true")
GREYAssert(expression(), reason, details: "Expected expression to be true")
}

public func GREYAssertTrue(_ expression: @autoclosure () -> Bool, reason: String) {
Expand Down
2 changes: 1 addition & 1 deletion test_projects/ios/EarlGreyExample/ops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ function earl_grey_example() {
$DIR/../../flank-scripts/bash/flankScripts shell ops ios --copy --generate
}

echo "iOS test projects ops loaded"
echo "iOS EarlGreyExample test projects ops loaded"
Loading

0 comments on commit 0f2b328

Please sign in to comment.