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

[feat]: Add CI workflow to run tests #62

Merged
merged 53 commits into from
Feb 15, 2024
Merged

[feat]: Add CI workflow to run tests #62

merged 53 commits into from
Feb 15, 2024

Conversation

johnkodes
Copy link
Contributor

@johnkodes johnkodes commented Jan 17, 2024

Changes:

  • Adds a workflow that should run tests on different versions of iOS + MacOS and also with different Xcodes.
    • Triggered on PRs and pushes to master
  • Adds test results via https://github.com/kishikawakatsumi/xcresulttool
    • only for iOS because macOS uses swift test instead of xcodebuild which is faster twice faster

Limitations:

  • We cannot test lower iOS versions because we build using Swift 5.9 (which requires Xcode 15) and the Github Runners don't have older simulators installed. https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#xcode
  • We cannot test the macOS version via swift test because the loading of files fails (resources are handled differently when running swift test vs xcodebuild). When running swift test they are not compiled into Assets.car which might be the reason why we are unable to load the file via NSDataAsset (in MockResponseProvider) but I haven't debugged that far to know that for sure.

Sources/Networking/Utils/FileDataWriter.swift Outdated Show resolved Hide resolved
Tests/NetworkingTests/Mocks/FileWriterSpy.swift Outdated Show resolved Hide resolved
@johnkodes johnkodes requested a review from matejmolnar January 25, 2024 16:46
Copy link
Collaborator

@cejanen cejanen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving few more questions/comments Ω

@johnkodes johnkodes requested a review from cejanen January 29, 2024 15:02
matejmolnar
matejmolnar previously approved these changes Jan 30, 2024
Copy link
Collaborator

@matejmolnar matejmolnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝

@johnkodes
Copy link
Contributor Author

johnkodes commented Jan 31, 2024

@matejmolnar @cejanen I hope you noticed but just to be sure that you've seen results that were added as part of this PR as well 😄

Found the checks:
CleanShot 2024-01-31 at 11 51 01

@johnkodes johnkodes requested a review from matejmolnar February 5, 2024 14:36
@johnkodes
Copy link
Contributor Author

@cejanen @matejmolnar Few more changes added in the tests. Let's have a look again please. Possibly the last review 😄

Copy link
Collaborator

@cejanen cejanen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Collaborator

@matejmolnar matejmolnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💪

@johnkodes johnkodes merged commit 3a2f7e7 into master Feb 15, 2024
4 checks passed
@johnkodes johnkodes deleted the feat/ci-workflow branch February 15, 2024 08:20
@johnkodes johnkodes linked an issue Feb 26, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run tests in PRs
3 participants