Skip to content
Merged
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
49 changes: 46 additions & 3 deletions .github/workflows/nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
swift-image:
- name: swiftlang/swift:nightly-6.2-jammy
- name: swiftlang/swift:nightly-6.3-jammy
config:
- mode: "debug"
- mode: "release"
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
fail-fast: false
matrix:
swift:
- version: 6.2-snapshot
- version: 6.3-snapshot

runs-on: macos-26

Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:
xcode:
- version: latest-stable
swift:
- version: 6.2-snapshot
- version: 6.3-snapshot
config:
- mode: "debug"
- mode: "release"
Expand Down Expand Up @@ -273,3 +273,46 @@ jobs:
--enable-code-coverage \
-Xswiftc -require-explicit-sendable \
-c ${{ matrix.config.mode }}

android-nightly-tests:
strategy:
fail-fast: false
matrix:
swift:
- version: nightly-6.3
config:
- mode: "debug"
- mode: "release"

runs-on: ubuntu-latest

timeout-minutes: 30

steps:
- name: Free disk space for emulator
run: |
sudo rm -rf /opt/microsoft /opt/google /opt/az /usr/share/miniconda /usr/share/az* /usr/share/glade* /usr/local/share/chromium /usr/local/share/powershell /usr/share/dotnet /opt/ghc /opt/hostedtoolcache/CodeQL /usr/local/share/boost
docker image prune --all --force
docker builder prune -a

- name: Ensure zstd is available for faster caching
run: sudo apt-get update -yq && sudo apt-get install -yq zstd

- name: Check out code
uses: actions/checkout@v6

- name: Replace symlinks with the actual files
run: find . -type l -exec sh -c 'LINKED="$(readlink -f "{}")"; rm "{}"; cp -a "$LINKED" "{}"' \;

- name: Run unit tests
uses: skiptools/swift-android-action@v2
with:
android-emulator-test-folder: /data/local/tmp/android-xctest
test-env: PROJECT_ROOT_FOR_TESTING=/data/local/tmp/android-xctest
swift-version: ${{ matrix.swift.version }}
swift-configuration: ${{ matrix.config.mode }}
copy-files: Tests
swift-build-flags: >-
--build-tests
--explicit-target-dependency-import-check error
swift-test-flags: --skip "IntegrationTests."
6 changes: 3 additions & 3 deletions Benchmarks/Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Benchmarks/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let package = Package(
.default(enabledTraits: ["IDNA_SUPPORT", "NIO_BYTE_BUFFER_SUPPORT"]),
],
dependencies: [
.package(url: "https://github.com/swift-dns/swift-idna.git", from: "1.0.0-beta.21"),
.package(url: "https://github.com/swift-dns/swift-idna.git", from: "1.0.0-beta.22"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.82.0"),
],
targets: [
Expand Down
6 changes: 3 additions & 3 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let package = Package(
.default(enabledTraits: ["IDNA_SUPPORT", "NIO_BYTE_BUFFER_SUPPORT"]),
],
dependencies: [
.package(url: "https://github.com/swift-dns/swift-idna.git", from: "1.0.0-beta.21"),
.package(url: "https://github.com/swift-dns/swift-idna.git", from: "1.0.0-beta.22"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.82.0"),
],
targets: [
Expand Down
2 changes: 1 addition & 1 deletion Sources/Domain/DomainName.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public struct DomainName: Sendable {
/// Non-ASCII names are converted to ASCII based on the IDNA spec, in the initializers.
/// Non-lowercased ASCII names are converted to lowercased ASCII in the initializers.
///
/// Based on the DNS specs, all names are case-insensitive.
/// Based on the DNS spec, all names are case-insensitive.
/// This package goes further and normalizes every domainName to lowercase to avoid inconsistencies.
///
/// [RFC 9499, DNS Terminology, March 2024](https://tools.ietf.org/html/rfc9499)
Expand Down
13 changes: 11 additions & 2 deletions Tests/EndpointTests/Resources.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,17 @@ enum Resources: String {
private func qualifiedPath() -> String {
var components = URL(fileURLWithPath: #filePath).pathComponents

while components.last != "swift-endpoint" {
components.removeLast()
if let projectRootForTesting = ProcessInfo.processInfo
.environment["PROJECT_ROOT_FOR_TESTING"],
!projectRootForTesting.isEmpty
{
components = URL(fileURLWithPath: projectRootForTesting).pathComponents
} else {
components = URL(fileURLWithPath: #filePath).pathComponents

while components.last != "swift-endpoint" {
components.removeLast()
}
}

components.append(contentsOf: ["Tests", "Resources", self.rawValue])
Expand Down