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

chore(Tests workflows): caching one build for Amplify-Package instead of one for each plugin #3342

Merged
merged 9 commits into from
Nov 9, 2023

Conversation

ruisebas
Copy link
Member

@ruisebas ruisebas commented Nov 2, 2023

Description

This PR makes the following changes to our unit tests and integration tests workflows:

  • Adds the missing targets to the Amplify-Package scheme
  • Updates the run_xcodebuild action to support dependencies and previous build caches.
  • Creates a new build-amplify-swift workflow that takes a platform and builds the Amplify-Package target and that caches the build folder.
    • This build cache is only saved when the workflow is run in the main branch, and it's the one used by all unit and integration test runs.
  • Creates a build-amplify-swift-platform workflow that runs the previous workflow for all our supported platforms.
  • Creates a run_unit_tests workflow that runs the unit tests for a scheme and platform, using the Amplify-Package build cache.
  • Renames run_xcodebuild_test_platforms to run_unit_tests_platforms, which calls the previous workflow for our targets and platforms.
  • Removes all the plugin and SHA specific caches, as they did not really speed things up and just made us frequently run out of cache space.
    • An Amplify-Package cache takes around 600 MB per platform, while the sum of all plugin caches was around 1.5 GB per platform.
  • Adds inputs to the unit tests workflows so we can run them only in certain platforms
  • Replaces the 'Dummy' values with 'None', as agreed in chore: Adding caching and retries to Integration Tests #3339 (comment)

General Checklist

  • Added new tests to cover change, if needed
  • Build succeeds with all target using Swift Package Manager
  • All unit tests pass
  • All integration tests pass
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Documentation update for the change if required
  • PR title conforms to conventional commit style
  • New or updated tests include Given When Then inline code documentation and are named accordingly testThing_condition_expectation()
  • If breaking change, documentation/changelog update with migration instructions

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:17 — with GitHub Actions Inactive
@ruisebas ruisebas temporarily deployed to IntegrationTest November 2, 2023 22:18 — with GitHub Actions Inactive
@ruisebas ruisebas merged commit ae59b0a into main Nov 9, 2023
98 checks passed
@ruisebas ruisebas deleted the ruisebas/unit_tests_tweak branch November 9, 2023 18:00
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.

3 participants