Skip to content

Conversation

@euanh
Copy link
Collaborator

@euanh euanh commented Dec 4, 2024

Motivation

For each pull request, the CI runs a number of test suites:

  • Soundness: these are static checks of formatting, language and so on
  • Unit tests: these check individual library functions in isolation
  • Integration tests: these check individual registry library functions against a test registry instance
  • Swift 6 Language Mode: this checks that the project compiles with Swift 6

These are all unit or integration tests; there are no complete system tests to exercise the build-container-image plugin, or that the examples work. It is difficult to test the build-container-image plugin in XCTest, but with GitHub Actions we can work through all the steps of building and deploying one of the examples, including using a Swift SDK. This will cover all the major parts of the project and ensure that the examples continue to work.

Modifications

This commit adds a new GitHub Actions test which:

  • Installs the static Linux SDK
  • Uses it to build an example service
  • Publishes the example image to a registry running in a service container
  • Deploys the image using Docker provided by the GitHub Actions runner
  • Verifies that the example service works

Result

An end-to-end build and deployment of one of the examples will be attempted for every pull request.

Test Plan

This commit adds a new test, which passes. All existing tests continue to pass.

@euanh euanh force-pushed the endtoend-tests branch 9 times, most recently from 6eba0b6 to 57fb78c Compare December 5, 2024 15:16
@euanh euanh changed the title wip: end to end tests in github actions tests: Build and run examples as end to end tests Dec 5, 2024
@euanh euanh marked this pull request as ready for review December 5, 2024 18:10
@euanh euanh force-pushed the endtoend-tests branch 2 times, most recently from 6032151 to 29ac3f2 Compare December 6, 2024 09:05
@euanh euanh added semver/none No version bump required. area/testing Improvements to tests. labels Dec 6, 2024
@euanh euanh merged commit bfdab0e into apple:main Dec 6, 2024
17 checks passed
@euanh euanh deleted the endtoend-tests branch December 6, 2024 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/testing Improvements to tests. semver/none No version bump required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant