diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index c002be5..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,69 +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 - - linux: - name: Test Swift ${{ matrix.swift }} - runs-on: ubuntu-latest - container: - image: swift:${{ matrix.swift }} - strategy: - matrix: - swift: ["5.8", "5.9", "5.10", "6.0", "6.1"] - steps: - - uses: actions/checkout@v3 - - name: Test - run: swift test --parallel - - # TODO: Add test coverage upload but it's currently not working with Swift 6.1.0/Ubuntu-latest - # test-coverage: - # runs-on: ubuntu-latest - # steps: - # - 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)/GraphitiPackageTests.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@v4 - # with: - # name: test-coverage-report - # path: .test-coverage diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..d51838a --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,14 @@ +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 diff --git a/Sources/Graphiti/Subscription/SubscribeField.swift b/Sources/Graphiti/Subscription/SubscribeField.swift index 1e4029e..65baa76 100644 --- a/Sources/Graphiti/Subscription/SubscribeField.swift +++ b/Sources/Graphiti/Subscription/SubscribeField.swift @@ -450,7 +450,7 @@ public extension SubscriptionField { convenience init( _ name: String, at function: @escaping SimpleAsyncResolve, - as: FieldType.Type, + as _: FieldType.Type, atSub subFunc: @escaping SimpleAsyncResolve< ObjectType, Context, @@ -470,7 +470,7 @@ public extension SubscriptionField { convenience init( _ name: String, at function: @escaping SimpleAsyncResolve, - as: FieldType.Type, + as _: FieldType.Type, atSub subFunc: @escaping SimpleAsyncResolve< ObjectType, Context, @@ -568,7 +568,7 @@ public extension SubscriptionField { convenience init( _ name: String, at function: @escaping SyncResolve, - as: FieldType.Type, + as _: FieldType.Type, atSub subFunc: @escaping SyncResolve< ObjectType, Context, @@ -589,7 +589,7 @@ public extension SubscriptionField { convenience init( _ name: String, at function: @escaping SyncResolve, - as: FieldType.Type, + as _: FieldType.Type, atSub subFunc: @escaping SyncResolve< ObjectType, Context, @@ -780,7 +780,7 @@ public extension SubscriptionField { Arguments, ResolveType >, - as: FieldType.Type, + as _: FieldType.Type, atSub subFunc: @escaping ConcurrentResolve< ObjectType, Context, @@ -806,7 +806,7 @@ public extension SubscriptionField { Arguments, ResolveType >, - as: FieldType.Type, + as _: FieldType.Type, atSub subFunc: @escaping ConcurrentResolve< ObjectType, Context,