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

fix: CI tests - WPB-14822 #2256

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/_reusable_app_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
WIRE_INTERNAL_GITHUB_USER: ${{ secrets.WIRE_INTERNAL_GITHUB_USER }}
WIRE_INTERNAL_GITHUB_TOKEN: ${{ secrets.WIRE_INTERNAL_GITHUB_TOKEN }}
APPCENTER_API_TOKEN: ${{ secrets.APPCENTER_API_TOKEN }}
APPCENTER_OWNER_NAME: ${{ secrets.APPCENTER_OWNER_NAME }}
APPCENTER_OWNER_NAME: "Wire"
S3_BUCKET: "z-lohika"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
WIRE_INTERNAL_GITHUB_USER: ${{ secrets.WIRE_INTERNAL_GITHUB_USER }}
WIRE_INTERNAL_GITHUB_TOKEN: ${{ secrets.WIRE_INTERNAL_GITHUB_TOKEN }}
APPCENTER_API_TOKEN: ${{ secrets.APPCENTER_API_TOKEN }}
APPCENTER_OWNER_NAME: ${{ secrets.APPCENTER_OWNER_NAME }}
APPCENTER_OWNER_NAME: "Wire"
S3_BUCKET: "z-lohika"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/_reusable_run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,6 @@ jobs:
**/SnapshotResults/
xcodebuild*.log

- name: Save cache with warning counts
# This step should only run for the test_develop.yml workflow
if: ${{ !cancelled() && github.event.action == 'push' }}
uses: actions/cache/save@v4
with:
path: Danger.results
key: ${{ github.event.head_commit.id || github.event.pull_request.merge_commit_sha || github.event.pull_request.head.sha }}-Danger.results

- name: Upload Test Reports as Artifacts
uses: actions/upload-artifact@v4
if: always()
Expand Down Expand Up @@ -181,7 +173,7 @@ jobs:

- name: Notify on Wire for iOS Nightly 🤖
uses: 8398a7/action-slack@v3
if: ${{ inputs.all }}
if: ${{ inputs.all && always() }}
with:
status: ${{ job.status }}
text: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
strategy:
matrix:
branch: [develop, release/cycle-3.114] # List other branches here
fail-fast: false # avoid to fail one job
uses: ./.github/workflows/_reusable_run_tests.yml
with:
all: true
Expand Down
43 changes: 29 additions & 14 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,21 @@ platform :ios do
end

UI.message "🤖 No schemes to test" if schemas.empty?

# hardcoded values that are required - not meaningful for testing
options[:build_type] = "Development"
options[:build_number] = 1
build = Build.new(options: options)


UI.message "🤖 Testing schemas: #{schemas.join(', ')}"

testplan = options[:testplan] || "AllTests"
schemas.each do |scheme|
UI.message "🤖 Testing scheme #{scheme} with plan #{testplan}"
test_plan(build, scheme, testplan)
end

run_tests_frameworks(schemas, options)
end

desc "Test one framework only"
lane :select_framework do |options|
frameworks = Framework.all.values
framework_options = frameworks.map { |f| f.scheme }

selected_choice = UI.select("Select a framework for testing:", framework_options)
framework = frameworks.find { |framework| framework.scheme == selected_choice }

run_tests_frameworks([framework.scheme], options)
end

lane :select_frameworks do |options|
frameworks = Framework.all.values
select_all = "All"
Expand Down Expand Up @@ -261,6 +260,22 @@ platform :ios do
build_and_upload_app(options)
end

def run_tests_frameworks(schemas, options)
# hardcoded values that are required - not meaningful for testing
options[:build_type] = "Development"
options[:build_number] = 1
build = Build.new(options: options)

UI.message "🤖 Testing schemas: #{schemas.join(', ')}"

testplan = options[:testplan] || "AllTests"
schemas.each do |scheme|
UI.message "🤖 Testing scheme #{scheme} with plan #{testplan}"
test_plan(build, scheme, testplan)
end
end


def build_and_upload_app(options)
options[:build_number] = generate_build_number
prepare_for_release(options)
Expand Down
Loading
Loading