From f9fbcf041f71668dada5d642c08fc70e7c5bc8c6 Mon Sep 17 00:00:00 2001 From: Jay Herron Date: Fri, 20 Jun 2025 17:03:38 +0200 Subject: [PATCH 1/3] ci: Uses GraphQLSwift CI --- .github/workflows/build.yml | 71 ------------------------------------- .github/workflows/test.yaml | 17 +++++++++ 2 files changed, 17 insertions(+), 71 deletions(-) delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 5887173..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Tests - -on: - push: - branches: [ main ] - paths-ignore: [ README.md ] - pull_request: - branches: [ main ] - paths-ignore: [ README.md ] - workflow_dispatch: - -jobs: - formatlint: - name: Format linting - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Pull formatting docker image - run: docker pull ghcr.io/nicklockwood/swiftformat:latest - - name: Run format linting - run: docker run --rm -v ${{ github.workspace }}:/repo ghcr.io/nicklockwood/swiftformat:latest /repo --lint - - macos: - name: Test on macOS - runs-on: macOS-latest - steps: - - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: latest-stable - - uses: actions/checkout@v3 - - name: Build and test - run: swift test --parallel --enable-test-discovery - - linux: - name: Test on Linux - runs-on: ubuntu-latest - steps: - - uses: swift-actions/setup-swift@v2 - - uses: actions/checkout@v3 - - name: Test - run: swift test --parallel --enable-code-coverage - - name: Get test coverage html - run: | - llvm-cov show \ - $(swift build --show-bin-path)/DataLoaderPackageTests.xctest \ - --instr-profile $(swift build --show-bin-path)/codecov/default.profdata \ - --ignore-filename-regex="\.build|Tests" \ - --format html \ - --output-dir=.test-coverage - - name: Upload test coverage html - uses: actions/upload-artifact@v3 - with: - name: test-coverage-report - path: .test-coverage - - backcompat-ubuntu-22_04: - name: Test Swift ${{ matrix.swift }} on Ubuntu 22.04 - runs-on: ubuntu-22.04 - strategy: - matrix: - swift: ["5.9", "5.10"] - steps: - - uses: swift-actions/setup-swift@v2 - with: - swift-version: ${{ matrix.swift }} - - uses: actions/checkout@v3 - - name: Test - run: swift test --parallel \ No newline at end of file diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..ce86063 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,17 @@ +name: test + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + lint: + uses: graphqlswift/ci/.github/workflows/lint.yaml@main + + test: + uses: graphqlswift/ci/.github/workflows/test.yaml@main + with: + include_android: false From 5e050d8291818affde02b618644d5bfe8b5f94c4 Mon Sep 17 00:00:00 2001 From: Jay Herron Date: Fri, 20 Jun 2025 17:06:50 +0200 Subject: [PATCH 2/3] chore: Backsupport Swift 5.8 --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index f67250b..649ecf9 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.9 +// swift-tools-version:5.8 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription From 9e142d01f7dd1a1b75c8f26aafbb882a9c92bd23 Mon Sep 17 00:00:00 2001 From: Jay Herron Date: Fri, 20 Jun 2025 17:08:10 +0200 Subject: [PATCH 3/3] chore: SwiftFormat changes --- Tests/AsyncDataLoaderTests/DataLoaderTests.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Tests/AsyncDataLoaderTests/DataLoaderTests.swift b/Tests/AsyncDataLoaderTests/DataLoaderTests.swift index 5987b14..3a89376 100644 --- a/Tests/AsyncDataLoaderTests/DataLoaderTests.swift +++ b/Tests/AsyncDataLoaderTests/DataLoaderTests.swift @@ -571,7 +571,6 @@ final class DataLoaderTests: XCTestCase { let identityLoader = DataLoader( options: DataLoaderOptions(executionPeriod: sleepConstant) ) { keys in - keys.map { DataLoaderValue.success($0) } }