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

Feature/Testing workflow improvements #304

Merged

Conversation

gentique
Copy link
Contributor

@gentique gentique commented Feb 2, 2024

Hey-ya 👋,

Added some minor changes & improvements:

  • Tests should run when a PR is opened, updated or reopened.
  • Replaced styfle/cancel-workflow-action with concurrency, does same thing just more native.
  • Updated checkout action to latest to alleviate warnings.
  • Replaced xcpretty with xcbeautify, is up to 2x faster & has the option to show annotations(warnings, test results) directly on the summary.

Copy link
Collaborator

@borut-t borut-t left a comment

Choose a reason for hiding this comment

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

Nice improvements 🙌

Comment on lines +8 to +10
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think concurrency doesn't work on m1 runners.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tested it out, following builds got canceled automatically (pushed a temporary commit & dropped it right after):

Superseded by: https://github.com/poviolabs/PovioKit/actions/runs/7791435474

- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
Copy link
Collaborator

Choose a reason for hiding this comment

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

👌

Comment on lines -24 to +28
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild build-for-testing -destination 'name=iPhone 14 Pro' -scheme 'PovioKit-Package' | xcpretty
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild build-for-testing -destination 'name=iPhone 14 Pro' -scheme 'PovioKit-Package' | xcbeautify --renderer github-actions

- name: Run tests
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -destination 'name=iPhone 14 Pro' -scheme 'PovioKit-Package' | xcpretty
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -destination 'name=iPhone 14 Pro' -scheme 'PovioKit-Package' | xcbeautify --renderer github-actions
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice 👌

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is already catching compiler warnings, soon to be errors with Swift 6:
Screenshot 2024-02-05 at 11 10 51 PM

@borut-t borut-t added the merge label Feb 5, 2024
@gentique gentique force-pushed the feature/testing-workflow-improvements branch 2 times, most recently from 4b04cee to 579ff99 Compare February 5, 2024 22:05
@gentique
Copy link
Contributor Author

gentique commented Feb 5, 2024

@borut-t feel free to merge.

@borut-t borut-t changed the title Feature/testing workflow improvements Feature/Testing workflow improvements May 7, 2024
@borut-t borut-t merged commit dc25178 into poviolabs:develop May 7, 2024
1 of 2 checks passed
borut-t pushed a commit that referenced this pull request May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants