Skip to content

Bump minimum Swift to 5.9, adopt StrictConcurrency=complete, add GitHub Actions CI #5

Bump minimum Swift to 5.9, adopt StrictConcurrency=complete, add GitHub Actions CI

Bump minimum Swift to 5.9, adopt StrictConcurrency=complete, add GitHub Actions CI #5

Workflow file for this run

name: PR
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
soundness:
name: Soundness
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
with:
license_header_check_project_name: "swift-etcd-client-gsoc"
unit-tests:
name: Unit tests
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
with:
linux_5_9_arguments_override: "--explicit-target-dependency-import-check error"
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
linux_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
# Integration tests use a running etcd so this job uses a service container.
integration-tests:
name: Integration tests
runs-on: ubuntu-latest
services:
etcd:
image: quay.io/coreos/etcd:v3.5.6
env:
ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
ETCD_INITIAL_CLUSTER_STATE: new
ports:
- 2379:2379
container:
image: swift:6.0-noble
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Build package
run: swift build --build-tests
- name: Run integration tests
shell: bash # explicitly choose bash, which ensures -o pipefail
run: swift test --filter "IntegrationTests" | tee test.out
env:
SWIFT_ETCD_CLIENT_INTEGRATION_TEST_ENABLED: true
ETCD_HOST: etcd
ETCD_PORT: 2379
- name: Check integration tests actually did run
run: test -r test.out && ! grep -i -e "executed 0 tests" -e "skipped" test.out
cxx-interop:
name: Cxx interop
uses: apple/swift-nio/.github/workflows/cxx_interop.yml@main