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

[2.0]: Swift 6 support #58

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM swift:5.8-bionic AS builder
FROM swift:6.0.2 AS builder
# WORKDIR /opt/testrunner
COPY src/testrunner ./

Expand All @@ -7,7 +7,7 @@ RUN swift --version
#RUN swift package clean
RUN swift build --configuration release

FROM swift:5.8-bionic
FROM swift:6.0.2
RUN apt-get update && apt-get install -y jq
WORKDIR /opt/test-runner/
COPY bin/ bin/
Expand Down
5 changes: 2 additions & 3 deletions bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,15 @@ fi
SLUG="$1"
INPUT_DIR="${2%/}"
OUTPUT_DIR="${3%/}"
junit_file="${INPUT_DIR}/results.xml"
junit_file="${INPUT_DIR}/results-swift-testing.xml"
capture_file="${OUTPUT_DIR}/capture"
spec_file="${INPUT_DIR}/$(jq -r '.files.test[0]' ${INPUT_DIR}/.meta/config.json)"
results_file="${OUTPUT_DIR}/results.json"
BASEDIR=$(dirname "$0")

touch "${results_file}"

export RUNALL=true
swift test --package-path "${INPUT_DIR}" -v --parallel --num-workers 1 --xunit-output "${junit_file}" &> "${capture_file}"
swift test --package-path "${INPUT_DIR}" --xunit-output "${INPUT_DIR}/results.xml" &> "${capture_file}"


./bin/TestRunner "${spec_file}" "${junit_file}" "${capture_file}" "${results_file}" "${SLUG}"
9 changes: 9 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# 2.0.0

- Updated to Swift 6.1
- Update swift-syntax to 600.0.0
- Use swift-testing instead of XCTest
- Brand new way of handling gathering test results, which is more robust and easier to maintain
- Depricated task_id, user output
- Uses version 2 instead of 3

# 1.1.3

- Fixed an issue making so outputs on multiple lines missed the last line
Expand Down
2 changes: 1 addition & 1 deletion src/testrunner/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let package = Package(
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(url: "https://github.com/apple/swift-syntax.git", exact: "508.0.1")
.package(url: "https://github.com/apple/swift-syntax.git", exact: "600.0.1")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
Loading
Loading