Merge pull request #191 from scribd/vijays/xcode_16 #1193
Workflow file for this run
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
name: Tests | |
on: push | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
jobs: | |
codegen_tests: | |
name: CodeGen Tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Clone Project | |
uses: actions/checkout@v4 | |
- name: Run Lucid CodeGen tests | |
run: | | |
swift test --package-path CodeGen --enable-test-discovery | |
lucid_tests: | |
name: Lucid-iOS Tests | |
runs-on: macos-15 | |
timeout-minutes: 30 | |
env: | |
FASTLANE_LOGS: fastlane/test_output | |
FASTLANE_FRAGILE_LOGS: fastlane/fragile_test_output | |
GITHUB_ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
FRAGILE_TESTS: LucidTests/APIClientQueueProcessorTests/test_processor_does_attempt_to_process_request_if_already_running_concurrent_request,LucidTests/CoreManagerPropertyTests/test_that_delegate_gets_called_when_observers_are_released,LucidTests/CoreManagerTests/test_continuous_observer_should_receive_all_updates_in_order,LucidTests/CoreManagerTests/test_manager_should_send_entity_update_to_provider_when_entity_is_set,LucidTests/RelationshipControllerTests/test_relationship_controller_should_continuously_send_events_when_first_event_comes_from_continuous_signal,LucidTests/RelationshipControllerTests/test_relationship_controller_should_continuously_send_events_when_first_event_comes_from_once_signal,LucidTests/StoreStackTests/test_should_fail_to_remove_in_remote_store_only_with_memory_store_first,LucidTests/RecoverableStoreTests/test_store_should_overwrite_a_non_empty_recovery_store_with_a_non_empty_main_store_at_init,LucidTests/RecoverableStoreTests/test_store_only_reflects_main_store_in_get_operations,LucidTests/RecoverableStoreTests/test_store_affects_both_inner_stores_in_remove_operations_async,LucidTests/CoreManagerTests/test_manager_should_send_entity_update_to_provider_when_entity_is_removed,LucidTests/RecoverableStoreTests/test_store_only_reflects_main_store_in_get_operations_asyncLucidTests/BaseStoreTests/test_store_should_set_1000_entities_in_under_1_second,LucidTests/CoreManagerContractTests/test_continuous_obvserver_should_get_filtered_results_matching_entities_that_meet_contract_requirements,LucidTests/CoreManagerContractTests/test_core_manager_get_should_filter_results_when_enity_does_not_meet_contract_requirements,LucidTests/CoreManagerContractTests/test_core_manager_get_should_return_complete_results_when_entity_meets_contract_requirements,LucidTests/CoreManagerContractTests/test_core_manager_get_should_return_empty_results_when_no_entities_meet_contract_requirements_in_remote_store_for_remote_data_source,LucidTests/CoreManagerContractTests/test_core_manager_get_should_return_local_result_when_no_entities_meet_contract_requirements_in_remote_store_for_remote_or_local_data_source,LucidTestsCoreManagerTests/test_manager_should_send_entity_update_to_provider_with_different_query_when_entity_is_not_found | |
steps: | |
- name: Clone Project | |
uses: actions/checkout@v4 | |
- name: Retrieve Xcode Version from File | |
id: get-xcode-version | |
run: echo "xcode-version=$(cat .xcode-version)" >> $GITHUB_OUTPUT | |
# use .xcode-version file to select the version of Xcode | |
- name: Select Xcode Version | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '${{ steps.get-xcode-version.outputs.xcode-version }}' | |
- name: Run Lucid-iOS Tests | |
run: | | |
fastlane scan --scheme Lucid-iOS --skip_testing "$FRAGILE_TESTS" --device "iPhone 16" --output_directory $FASTLANE_LOGS --result_bundle true | |
# Some tests need to be reworked. Don't forget about them, but don't crash the build either | |
# https://scribdjira.atlassian.net/browse/IPT-4387 | |
- name: Run Fragile Tests | |
continue-on-error: true | |
run: | | |
fastlane scan --scheme Lucid-iOS --only_testing "$FRAGILE_TESTS" --device "iPhone 16" --output_directory $FASTLANE_FRAGILE_LOGS --result_bundle true | |
- name: Bundle Log Files | |
run: | | |
cd $FASTLANE_LOGS | |
zip -rX build-artifacts.zip . | |
cd $OLDPWD | |
cd $FASTLANE_FRAGILE_LOGS | |
zip -rX build-artifacts.zip . | |
- name: Upload Fastlane Log Files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifacts | |
path: | | |
${{ env.FASTLANE_LOGS }}/build-artifacts.zip | |
${{ env.FASTLANE_FRAGILE_LOGS }}/build-artifacts.zip |