From 1543879f91bd9ef4de3235e6ea9b19563f0aecef Mon Sep 17 00:00:00 2001 From: Jason Morley Date: Fri, 11 Oct 2024 07:42:54 -1000 Subject: [PATCH] ci: Ensure Ubuntu builds fail if tests fail (#289) --- Tests/InContextTests/Tests/BasenameDetailsTests.swift | 6 ++++++ scripts/build-ubuntu.sh | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/Tests/InContextTests/Tests/BasenameDetailsTests.swift b/Tests/InContextTests/Tests/BasenameDetailsTests.swift index a03136a..a5f8a04 100644 --- a/Tests/InContextTests/Tests/BasenameDetailsTests.swift +++ b/Tests/InContextTests/Tests/BasenameDetailsTests.swift @@ -81,6 +81,10 @@ class BasenameDetailsTests: XCTestCase { XCTAssertEqual(url.parentURL, "/posts/") } +#if os(macOS) + + // TODO: BasenameDetailsTests.testRootIndexNoTitle fails on Ubuntu #290 + // https://github.com/inseven/incontext/issues/290 func testRootIndexNoTitle() { let rootURL = URL(filePath: "/tmp", directoryHint: .isDirectory) let url = URL(filePath: "index.markdown", relativeTo: rootURL) @@ -90,6 +94,8 @@ class BasenameDetailsTests: XCTestCase { XCTAssertNil(details.scale) } +#endif + func testScale() throws { let rootURL = URL(filePath: "/tmp", directoryHint: .isDirectory) let url = URL(filePath: "books@2x.png", relativeTo: rootURL) diff --git a/scripts/build-ubuntu.sh b/scripts/build-ubuntu.sh index aaa272b..8e6ab9f 100755 --- a/scripts/build-ubuntu.sh +++ b/scripts/build-ubuntu.sh @@ -1,5 +1,10 @@ #!/usr/bin/env bash +set -e +set -o pipefail +set -x +set -u + export SWIFT_BIN=$PWD/swift-5.10-RELEASE-ubuntu22.04/usr/bin if [ ! -d "$SWIFT_BIN" ] ; then