From 700a349d7c0ebd6eb71ca40b556f0bd6db54c704 Mon Sep 17 00:00:00 2001 From: danthorpe Date: Thu, 7 Mar 2024 09:07:35 +0000 Subject: [PATCH 1/9] chore: Add CI --- .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++++++++++++++++ .scripts/ci-test.sh | 4 ++++ 2 files changed, 47 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100755 .scripts/ci-test.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..92c500402 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: Tests + +on: + push: + paths-ignore: + - '.github/**.md' + - 'README.md' + branches: + - main + pull_request: + paths-ignore: + - '.github/**.md' + - 'README.md' + types: [opened, synchronize, reopened, ready_for_review] + +jobs: + test: + runs-on: macos-14 + concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + steps: + - uses: SwiftyLab/setup-swift@latest + with: + development: true + + - name: Get swift version in macOS + if: runner.os == 'macOS' + run: xcrun --toolchain ${{ env.TOOLCHAINS }} swift --version + + - name: Checkout + uses: actions/checkout@v4 + + - name: Cache SPM + uses: actions/cache@v4 + with: + path: .build + key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} + restore-keys: | + ${{ runner.os }}-spm- + + - name: Test + run: .scripts/ci-test.sh diff --git a/.scripts/ci-test.sh b/.scripts/ci-test.sh new file mode 100755 index 000000000..113c0bc4e --- /dev/null +++ b/.scripts/ci-test.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +set -euo pipefail + +swift test \ No newline at end of file From 683e6a9c9cf8dbcf71da2b297e64bf2190444186 Mon Sep 17 00:00:00 2001 From: danthorpe Date: Thu, 7 Mar 2024 13:35:23 +0000 Subject: [PATCH 2/9] chore: Remove SwiftyLab/setup-swift --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92c500402..5ed91d65b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,9 +20,6 @@ jobs: group: ${{ github.ref }} cancel-in-progress: true steps: - - uses: SwiftyLab/setup-swift@latest - with: - development: true - name: Get swift version in macOS if: runner.os == 'macOS' From 75759a7ebbd20920ed1fe71dae1eda8b98bf323e Mon Sep 17 00:00:00 2001 From: danthorpe Date: Thu, 7 Mar 2024 13:42:52 +0000 Subject: [PATCH 3/9] chore: Force Swift 5.10.0 --- .github/workflows/ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ed91d65b..73309ffcc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,10 +20,16 @@ jobs: group: ${{ github.ref }} cancel-in-progress: true steps: - + - uses: SwiftyLab/setup-swift@latest + with: + swift-version: "5.10.0" + + - name: Get swift version + run: swift --version # Swift 5.10.0 + - name: Get swift version in macOS if: runner.os == 'macOS' - run: xcrun --toolchain ${{ env.TOOLCHAINS }} swift --version + run: xcrun --toolchain ${{ env.TOOLCHAINS }} swift --version # Swift 5.1.0 - name: Checkout uses: actions/checkout@v4 From 2e84d4e1a60086d558bb4f601411fae553c19876 Mon Sep 17 00:00:00 2001 From: danthorpe Date: Thu, 7 Mar 2024 13:54:50 +0000 Subject: [PATCH 4/9] chore: Update TCA to 1.9.2 --- Package.resolved | 10 +++++----- Package.swift | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Package.resolved b/Package.resolved index 2c698534e..871622d17 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "e9c216a79f623470cd0f734b5d718bee4a1bfa72dae2e13630d33f1a5756acad", + "originHash" : "a1cfcd4e9d9d54b2963686712ebe5fe51ab4b11a0e937c5cd607329a54e82894", "pins" : [ { "identity" : "combine-schedulers", @@ -15,8 +15,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/swift-case-paths", "state" : { - "revision" : "551150d5e60e3be78972607d89cd69069cca3e7c", - "version" : "1.2.4" + "revision" : "e593aba2c6222daad7c4f2732a431eed2c09bb07", + "version" : "1.3.0" } }, { @@ -42,8 +42,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/swift-composable-architecture", "state" : { - "revision" : "856f9b8d82f6851b7f61ec4c5ce9e4c18ebbdb45", - "version" : "1.8.2" + "revision" : "115fe5af41d333b6156d4924d7c7058bc77fd580", + "version" : "1.9.2" } }, { diff --git a/Package.swift b/Package.swift index db251cc42..3f47c44c0 100644 --- a/Package.swift +++ b/Package.swift @@ -75,7 +75,7 @@ extension [SwiftSetting] { // MARK: - 👜 3rd Party Dependencies package.dependencies = [ - .package(url: "https://github.com/pointfreeco/swift-composable-architecture", from: "1.8.0"), + .package(url: "https://github.com/pointfreeco/swift-composable-architecture", from: "1.9.0"), .package(url: "https://github.com/apple/swift-testing", branch: "main"), ] From a77c7551059c83215f530fbdad45dbbc734af4fa Mon Sep 17 00:00:00 2001 From: danthorpe Date: Thu, 7 Mar 2024 21:31:18 +0000 Subject: [PATCH 5/9] chore: ci --- .github/workflows/ci.yml | 33 +++++++++++++++------------------ .scripts/ci-test.sh | 4 ---- Makefile | 12 ++++++++++++ 3 files changed, 27 insertions(+), 22 deletions(-) delete mode 100755 .scripts/ci-test.sh create mode 100644 Makefile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73309ffcc..80f827b39 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,34 +13,31 @@ on: - 'README.md' types: [opened, synchronize, reopened, ready_for_review] +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + jobs: test: - runs-on: macos-14 - concurrency: - group: ${{ github.ref }} - cancel-in-progress: true + name: Tests + runs-on: macos-14 steps: - - uses: SwiftyLab/setup-swift@latest + - uses: actions/checkout@v4 + - name: Select Xcode 15.2 + run: sudo xcode-select -s /Applications/Xcode_15.2.app + - name: Select Swift 5.10 + uses: SwiftyLab/setup-swift@latest with: swift-version: "5.10.0" - - - name: Get swift version - run: swift --version # Swift 5.10.0 - - - name: Get swift version in macOS + - name: Report Swift Version if: runner.os == 'macOS' run: xcrun --toolchain ${{ env.TOOLCHAINS }} swift --version # Swift 5.1.0 - - - name: Checkout - uses: actions/checkout@v4 - - name: Cache SPM uses: actions/cache@v4 with: path: .build - key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} + key: v1-${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} restore-keys: | - ${{ runner.os }}-spm- - + v1-${{ runner.os }}-spm- - name: Test - run: .scripts/ci-test.sh + run: make test-all diff --git a/.scripts/ci-test.sh b/.scripts/ci-test.sh deleted file mode 100755 index 113c0bc4e..000000000 --- a/.scripts/ci-test.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -swift test \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..c87a69947 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +CONFIG = debug +PLATFORM_IOS = iOS Simulator,id=$(call udid_for,iOS 17.2,iPhone \d\+ Pro [^M]) +PLATFORM_MACOS = macOS +PLATFORM_MAC_CATALYST = macOS,variant=Mac Catalyst +PLATFORM_TVOS = tvOS Simulator,id=$(call udid_for,tvOS 17.2,TV) +PLATFORM_VISIONOS = visionOS Simulator,id=$(call udid_for,visionOS 1.0,Vision) +PLATFORM_WATCHOS = watchOS Simulator,id=$(call udid_for,watchOS 10.2,Watch) + +default: test-all + +test-all: + swift test From 85fe04152b8b72a7eca435e082f52e0a017e2e6f Mon Sep 17 00:00:00 2001 From: danthorpe Date: Thu, 7 Mar 2024 21:43:44 +0000 Subject: [PATCH 6/9] ci: check-latest --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80f827b39..aadc8386e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - name: Select Swift 5.10 uses: SwiftyLab/setup-swift@latest with: - swift-version: "5.10.0" + check-latest: true - name: Report Swift Version if: runner.os == 'macOS' run: xcrun --toolchain ${{ env.TOOLCHAINS }} swift --version # Swift 5.1.0 From 51a024b21801cceeca81da62f802c1430b6f754d Mon Sep 17 00:00:00 2001 From: danthorpe Date: Thu, 11 Apr 2024 07:15:29 +0100 Subject: [PATCH 7/9] wip --- .github/workflows/{ci.yml => tests.yml} | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) rename .github/workflows/{ci.yml => tests.yml} (72%) diff --git a/.github/workflows/ci.yml b/.github/workflows/tests.yml similarity index 72% rename from .github/workflows/ci.yml rename to .github/workflows/tests.yml index aadc8386e..480f7fd12 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/tests.yml @@ -17,21 +17,21 @@ concurrency: group: ci-${{ github.ref }} cancel-in-progress: true +env: + DEVELOPER_DIR: /Applications/Xcode_15.3.app/Contents/Developer + jobs: test: name: Tests - runs-on: macos-14 + runs-on: macos-14 steps: - - uses: actions/checkout@v4 - - name: Select Xcode 15.2 - run: sudo xcode-select -s /Applications/Xcode_15.2.app - - name: Select Swift 5.10 - uses: SwiftyLab/setup-swift@latest - with: - check-latest: true - name: Report Swift Version if: runner.os == 'macOS' - run: xcrun --toolchain ${{ env.TOOLCHAINS }} swift --version # Swift 5.1.0 + run: xcrun --toolchain ${{ env.TOOLCHAINS }} swift --version + + - name: Checkout Package + uses: actions/checkout@v4 + - name: Cache SPM uses: actions/cache@v4 with: From 01424d19185add2b600da486eae08b9c291d035e Mon Sep 17 00:00:00 2001 From: danthorpe Date: Thu, 11 Apr 2024 07:23:33 +0100 Subject: [PATCH 8/9] wip --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 480f7fd12..49a935463 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Report Swift Version if: runner.os == 'macOS' - run: xcrun --toolchain ${{ env.TOOLCHAINS }} swift --version + run: xcrun swift --version - name: Checkout Package uses: actions/checkout@v4 From 3aa35f8752ad62a29620515989f53cdd7feefa06 Mon Sep 17 00:00:00 2001 From: danthorpe Date: Thu, 11 Apr 2024 07:26:50 +0100 Subject: [PATCH 9/9] wip --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 49a935463..fbda546b2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,7 +26,6 @@ jobs: runs-on: macos-14 steps: - name: Report Swift Version - if: runner.os == 'macOS' run: xcrun swift --version - name: Checkout Package