From a6d1b4935d24a75cd1966aea718f42ded008bbcd Mon Sep 17 00:00:00 2001 From: Mahdi Bahrami Date: Sat, 14 Dec 2024 07:11:00 +0330 Subject: [PATCH 1/6] Use Apple's GitHub Workflows linting script --- .github/workflows/run-unit-tests.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-unit-tests.yml b/.github/workflows/run-unit-tests.yml index 3de12a1..c518f1a 100644 --- a/.github/workflows/run-unit-tests.yml +++ b/.github/workflows/run-unit-tests.yml @@ -243,8 +243,10 @@ jobs: if: ${{ inputs.with_linting }} runs-on: ubuntu-latest container: swift:6.0-noble - timeout-minutes: 30 + timeout-minutes: 5 steps: + - name: Configure git + run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" - name: Check out code uses: actions/checkout@v4 - name: Read config file @@ -256,7 +258,9 @@ jobs: curl -O https://raw.githubusercontent.com/vapor/contributing/refs/heads/main/.swift-format fi - name: Lint - run: swift-format lint --recursive --strict --parallel . + run: | + apt -q update && apt -yq install curl + curl -s https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/scripts/check-swift-format.sh | bash musl: if: ${{ !(github.event.pull_request.draft || false) && inputs.with_musl }} From cf5390b52fb73e6ee3a49cefa0475a709f43358c Mon Sep 17 00:00:00 2001 From: Mahdi Bahrami Date: Sat, 14 Dec 2024 07:21:17 +0330 Subject: [PATCH 2/6] try again the old config --- .github/workflows/run-unit-tests.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/run-unit-tests.yml b/.github/workflows/run-unit-tests.yml index c518f1a..44e7f6c 100644 --- a/.github/workflows/run-unit-tests.yml +++ b/.github/workflows/run-unit-tests.yml @@ -258,9 +258,7 @@ jobs: curl -O https://raw.githubusercontent.com/vapor/contributing/refs/heads/main/.swift-format fi - name: Lint - run: | - apt -q update && apt -yq install curl - curl -s https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/scripts/check-swift-format.sh | bash + run: swift-format lint --recursive --strict --parallel . musl: if: ${{ !(github.event.pull_request.draft || false) && inputs.with_musl }} From b6730bca3f6611bebb3d7453547ca43ca008e75f Mon Sep 17 00:00:00 2001 From: Mahdi Bahrami Date: Sat, 14 Dec 2024 07:30:02 +0330 Subject: [PATCH 3/6] revert to the new code --- .github/workflows/run-unit-tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-unit-tests.yml b/.github/workflows/run-unit-tests.yml index 44e7f6c..c518f1a 100644 --- a/.github/workflows/run-unit-tests.yml +++ b/.github/workflows/run-unit-tests.yml @@ -258,7 +258,9 @@ jobs: curl -O https://raw.githubusercontent.com/vapor/contributing/refs/heads/main/.swift-format fi - name: Lint - run: swift-format lint --recursive --strict --parallel . + run: | + apt -q update && apt -yq install curl + curl -s https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/scripts/check-swift-format.sh | bash musl: if: ${{ !(github.event.pull_request.draft || false) && inputs.with_musl }} From c8cf304fc707e615e00b295ec7517b19685c6398 Mon Sep 17 00:00:00 2001 From: MahdiBM Date: Sat, 14 Dec 2024 08:04:50 +0330 Subject: [PATCH 4/6] format --- .../SampleTestablePackageTests/SampleTestablePackageTests.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/sample-testable-package/Tests/SampleTestablePackageTests/SampleTestablePackageTests.swift b/sample-testable-package/Tests/SampleTestablePackageTests/SampleTestablePackageTests.swift index e8d750c..28cfa85 100644 --- a/sample-testable-package/Tests/SampleTestablePackageTests/SampleTestablePackageTests.swift +++ b/sample-testable-package/Tests/SampleTestablePackageTests/SampleTestablePackageTests.swift @@ -1,4 +1,5 @@ import XCTest + @testable import SampleTestablePackage final class SampleTestablePackageTests: XCTestCase { From f5cdfb3880abc4f36b467e081902a58f9b44c572 Mon Sep 17 00:00:00 2001 From: MahdiBM Date: Sat, 14 Dec 2024 08:05:43 +0330 Subject: [PATCH 5/6] try smth --- .../SampleTestablePackageTests/SampleTestablePackageTests.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/sample-testable-package/Tests/SampleTestablePackageTests/SampleTestablePackageTests.swift b/sample-testable-package/Tests/SampleTestablePackageTests/SampleTestablePackageTests.swift index 28cfa85..e8d750c 100644 --- a/sample-testable-package/Tests/SampleTestablePackageTests/SampleTestablePackageTests.swift +++ b/sample-testable-package/Tests/SampleTestablePackageTests/SampleTestablePackageTests.swift @@ -1,5 +1,4 @@ import XCTest - @testable import SampleTestablePackage final class SampleTestablePackageTests: XCTestCase { From 8a1221844fa558229cddffbf747efa4a386e6dda Mon Sep 17 00:00:00 2001 From: MahdiBM Date: Sat, 14 Dec 2024 08:05:56 +0330 Subject: [PATCH 6/6] Revert "try smth" This reverts commit f5cdfb3880abc4f36b467e081902a58f9b44c572. --- .../SampleTestablePackageTests/SampleTestablePackageTests.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/sample-testable-package/Tests/SampleTestablePackageTests/SampleTestablePackageTests.swift b/sample-testable-package/Tests/SampleTestablePackageTests/SampleTestablePackageTests.swift index e8d750c..28cfa85 100644 --- a/sample-testable-package/Tests/SampleTestablePackageTests/SampleTestablePackageTests.swift +++ b/sample-testable-package/Tests/SampleTestablePackageTests/SampleTestablePackageTests.swift @@ -1,4 +1,5 @@ import XCTest + @testable import SampleTestablePackage final class SampleTestablePackageTests: XCTestCase {