Commit bfdab0e
authored
tests: Build and run examples as end to end tests (#39)
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.1 parent 403e0fe commit bfdab0e
File tree
2 files changed
+49
-1
lines changed- .github/workflows
- Examples/HelloWorldHummingbird
2 files changed
+49
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
54 | 103 | | |
55 | 104 | | |
56 | 105 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
0 commit comments