This PR contains the work done to support the building of Docker images in the `Build` subcommand in the executable target. So, for this purpose, the following task have been done: - added a basic boilerplate of the `docker-compose.yml` file; - fixed some issues found in the boilerplate of the `Dockerfile` file; - defined the `Randomable` protocol; - defined the `Artifact` enumeration; - updated the `BuildProjectTask` task to support building Docker images if required; - renamed the `BuildProjectTask` task as `BuildArtifactTask`. Reviewed-on: #11 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
33 lines
538 B
Swift
33 lines
538 B
Swift
import Testing
|
|
|
|
@testable import ColibriLibrary
|
|
|
|
struct RandomableTest {
|
|
|
|
@Test func random() {
|
|
// GIVEN
|
|
let allCases = TestRandomable.allCases
|
|
|
|
// WHEN
|
|
let random = TestRandomable.random()
|
|
|
|
// THEN
|
|
#expect(allCases.contains(random))
|
|
}
|
|
|
|
}
|
|
|
|
// MARK: - Enumerations
|
|
|
|
enum TestRandomable: Randomable {
|
|
case someCase
|
|
case someOtherCase
|
|
|
|
// MARK: Functions
|
|
|
|
static func random() -> TestRandomable {
|
|
.allCases.randomElement() ?? .someCase
|
|
}
|
|
|
|
}
|