From 913ee7039efaa29a370dc28746bf2fb365aa5d21 Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Tue, 7 Oct 2025 16:42:34 -0300 Subject: [PATCH 1/5] chore(ci): supabase-cli --- .github/workflows/ci.yml | 299 ++++++++++++++++++++------------------- 1 file changed, 155 insertions(+), 144 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1298c8f8..c89f6c17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,162 +43,173 @@ permissions: contents: read jobs: - macos: - name: xcodebuild (macOS latest) + supabase-cli-test: runs-on: macos-15 - strategy: - matrix: - command: [test, ""] - platform: [IOS, MACOS] - xcode: ["26.0", "16.4"] - include: - - { command: test, skip_release: 1 } steps: - uses: actions/checkout@v5 - - name: Select Xcode ${{ matrix.xcode }} - run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app - - name: List available devices - run: xcrun simctl list devices available - - name: Set IgnoreFileSystemDeviceInodeChanges flag - run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES - - name: Update mtime for incremental builds - uses: chetan/git-restore-mtime-action@v2 - - name: Debug - run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" xcodebuild - - name: Release - if: matrix.skip_release != '1' - run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Release PLATFORM="${{ matrix.platform }}" xcodebuild - - name: Install lcov - if: matrix.command == 'test' && matrix.platform == 'IOS' && matrix.xcode == '26.0' - run: brew install lcov - - name: Export code coverage - id: coverage - if: matrix.command == 'test' && matrix.platform == 'IOS' && matrix.xcode == '26.0' - run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" coverage - - uses: coverallsapp/github-action@v2.3.6 - if: steps.coverage.outcome == 'success' + - uses: supabase/setup-cli@v1 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - file: lcov.info + version: latest + - run: supabase start + - run: supabase db reset + - run: swift test --filter IntegrationTests + - run: supabase stop + # macos: + # name: xcodebuild (macOS latest) + # runs-on: macos-15 + # strategy: + # matrix: + # command: [test, ""] + # platform: [IOS, MACOS] + # xcode: ["26.0", "16.4"] + # include: + # - { command: test, skip_release: 1 } + # steps: + # - uses: actions/checkout@v5 + # - name: Select Xcode ${{ matrix.xcode }} + # run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app + # - name: List available devices + # run: xcrun simctl list devices available + # - name: Set IgnoreFileSystemDeviceInodeChanges flag + # run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES + # - name: Update mtime for incremental builds + # uses: chetan/git-restore-mtime-action@v2 + # - name: Debug + # run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" xcodebuild + # - name: Release + # if: matrix.skip_release != '1' + # run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Release PLATFORM="${{ matrix.platform }}" xcodebuild + # - name: Install lcov + # if: matrix.command == 'test' && matrix.platform == 'IOS' && matrix.xcode == '26.0' + # run: brew install lcov + # - name: Export code coverage + # id: coverage + # if: matrix.command == 'test' && matrix.platform == 'IOS' && matrix.xcode == '26.0' + # run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" coverage + # - uses: coverallsapp/github-action@v2.3.6 + # if: steps.coverage.outcome == 'success' + # with: + # github-token: ${{ secrets.GITHUB_TOKEN }} + # file: lcov.info - macos-legacy: - name: xcodebuild (macOS legacy) - runs-on: macos-14 - strategy: - matrix: - command: [test, ""] - platform: [IOS, MACOS, MAC_CATALYST] - xcode: ["15.4"] - include: - - { command: test, skip_release: 1 } - steps: - - uses: actions/checkout@v5 - - name: Select Xcode ${{ matrix.xcode }} - run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app - - name: List available devices - run: xcrun simctl list devices available - - name: Cache derived data - uses: actions/cache@v4 - with: - path: | - ~/.derivedData - key: | - deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }} - restore-keys: | - deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}- - - name: Set IgnoreFileSystemDeviceInodeChanges flag - run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES - - name: Update mtime for incremental builds - uses: chetan/git-restore-mtime-action@v2 - - name: Debug - run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" xcodebuild - - name: Release - if: matrix.skip_release != '1' - run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Release PLATFORM="${{ matrix.platform }}" xcodebuild + # macos-legacy: + # name: xcodebuild (macOS legacy) + # runs-on: macos-14 + # strategy: + # matrix: + # command: [test, ""] + # platform: [IOS, MACOS, MAC_CATALYST] + # xcode: ["15.4"] + # include: + # - { command: test, skip_release: 1 } + # steps: + # - uses: actions/checkout@v5 + # - name: Select Xcode ${{ matrix.xcode }} + # run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app + # - name: List available devices + # run: xcrun simctl list devices available + # - name: Cache derived data + # uses: actions/cache@v4 + # with: + # path: | + # ~/.derivedData + # key: | + # deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }} + # restore-keys: | + # deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}- + # - name: Set IgnoreFileSystemDeviceInodeChanges flag + # run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES + # - name: Update mtime for incremental builds + # uses: chetan/git-restore-mtime-action@v2 + # - name: Debug + # run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" xcodebuild + # - name: Release + # if: matrix.skip_release != '1' + # run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Release PLATFORM="${{ matrix.platform }}" xcodebuild - spm: - runs-on: macos-15 - strategy: - matrix: - config: [debug, release] - steps: - - uses: actions/checkout@v5 - - uses: actions/cache@v4 - with: - path: .build - key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} - restore-keys: | - ${{ runner.os }}-spm- - - run: swift build -c ${{ matrix.config }} + # spm: + # runs-on: macos-15 + # strategy: + # matrix: + # config: [debug, release] + # steps: + # - uses: actions/checkout@v5 + # - uses: actions/cache@v4 + # with: + # path: .build + # key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} + # restore-keys: | + # ${{ runner.os }}-spm- + # - run: swift build -c ${{ matrix.config }} - linux: - name: Linux - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - name: "Remove IntegrationTests" - run: rm -r Tests/IntegrationTests/* - - name: "Build Swift Package" - run: swift build - - # android: - # name: Android + # linux: + # name: Linux # runs-on: ubuntu-latest # steps: # - uses: actions/checkout@v5 # - name: "Remove IntegrationTests" # run: rm -r Tests/IntegrationTests/* - # - name: "Test Swift Package" - # uses: skiptools/swift-android-action@v2 - # with: - # # need to copy over the Tests folder because it contains __Snapshots__ - # copy-files: Tests - # # tests are not yet passing on Android - # run-tests: false + # - name: "Build Swift Package" + # run: swift build + + # # android: + # # name: Android + # # runs-on: ubuntu-latest + # # steps: + # # - uses: actions/checkout@v5 + # # - name: "Remove IntegrationTests" + # # run: rm -r Tests/IntegrationTests/* + # # - name: "Test Swift Package" + # # uses: skiptools/swift-android-action@v2 + # # with: + # # # need to copy over the Tests folder because it contains __Snapshots__ + # # copy-files: Tests + # # # tests are not yet passing on Android + # # run-tests: false - library-evolution: - name: Library (evolution) - runs-on: macos-15 - strategy: - matrix: - xcode: ["16.3"] - steps: - - uses: actions/checkout@v5 - - name: Select Xcode ${{ matrix.xcode }} - run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app - - name: Build for library evolution - run: make build-for-library-evolution + # library-evolution: + # name: Library (evolution) + # runs-on: macos-15 + # strategy: + # matrix: + # xcode: ["16.3"] + # steps: + # - uses: actions/checkout@v5 + # - name: Select Xcode ${{ matrix.xcode }} + # run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app + # - name: Build for library evolution + # run: make build-for-library-evolution - examples: - name: Examples - runs-on: macos-15 - steps: - - uses: actions/checkout@v5 - - name: Cache derived data - uses: actions/cache@v4 - with: - path: ~/.derivedData - key: | - deriveddata-examples-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift', '**/Examples/**/*.swift') }} - restore-keys: | - deriveddata-examples- - - name: Select Xcode 16.3 - run: sudo xcode-select -s /Applications/Xcode_16.3.app - - name: Set IgnoreFileSystemDeviceInodeChanges flag - run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES - - name: Update mtime for incremental builds - uses: chetan/git-restore-mtime-action@v2 - - name: Examples - run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="Examples" XCODEBUILD_ARGUMENT=build xcodebuild - - name: SlackClone - run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="SlackClone" XCODEBUILD_ARGUMENT=build xcodebuild - - name: UserManagement - run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="UserManagement" XCODEBUILD_ARGUMENT=build xcodebuild + # examples: + # name: Examples + # runs-on: macos-15 + # steps: + # - uses: actions/checkout@v5 + # - name: Cache derived data + # uses: actions/cache@v4 + # with: + # path: ~/.derivedData + # key: | + # deriveddata-examples-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift', '**/Examples/**/*.swift') }} + # restore-keys: | + # deriveddata-examples- + # - name: Select Xcode 16.3 + # run: sudo xcode-select -s /Applications/Xcode_16.3.app + # - name: Set IgnoreFileSystemDeviceInodeChanges flag + # run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES + # - name: Update mtime for incremental builds + # uses: chetan/git-restore-mtime-action@v2 + # - name: Examples + # run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="Examples" XCODEBUILD_ARGUMENT=build xcodebuild + # - name: SlackClone + # run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="SlackClone" XCODEBUILD_ARGUMENT=build xcodebuild + # - name: UserManagement + # run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="UserManagement" XCODEBUILD_ARGUMENT=build xcodebuild - docs: - name: Test docs - runs-on: macos-15 - steps: - - uses: actions/checkout@v5 - - name: Test docs - run: make test-docs + # docs: + # name: Test docs + # runs-on: macos-15 + # steps: + # - uses: actions/checkout@v5 + # - name: Test docs + # run: make test-docs From 1bde1f8f57e0758b66a0ba68d709ae1c2c47de82 Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Tue, 7 Oct 2025 16:48:17 -0300 Subject: [PATCH 2/5] test docker --- .github/workflows/ci.yml | 299 ++++++++++++++++++------------------- .github/workflows/test.yml | 29 ++++ 2 files changed, 173 insertions(+), 155 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c89f6c17..1298c8f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,173 +43,162 @@ permissions: contents: read jobs: - supabase-cli-test: + macos: + name: xcodebuild (macOS latest) runs-on: macos-15 + strategy: + matrix: + command: [test, ""] + platform: [IOS, MACOS] + xcode: ["26.0", "16.4"] + include: + - { command: test, skip_release: 1 } steps: - uses: actions/checkout@v5 - - uses: supabase/setup-cli@v1 + - name: Select Xcode ${{ matrix.xcode }} + run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app + - name: List available devices + run: xcrun simctl list devices available + - name: Set IgnoreFileSystemDeviceInodeChanges flag + run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES + - name: Update mtime for incremental builds + uses: chetan/git-restore-mtime-action@v2 + - name: Debug + run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" xcodebuild + - name: Release + if: matrix.skip_release != '1' + run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Release PLATFORM="${{ matrix.platform }}" xcodebuild + - name: Install lcov + if: matrix.command == 'test' && matrix.platform == 'IOS' && matrix.xcode == '26.0' + run: brew install lcov + - name: Export code coverage + id: coverage + if: matrix.command == 'test' && matrix.platform == 'IOS' && matrix.xcode == '26.0' + run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" coverage + - uses: coverallsapp/github-action@v2.3.6 + if: steps.coverage.outcome == 'success' with: - version: latest - - run: supabase start - - run: supabase db reset - - run: swift test --filter IntegrationTests - - run: supabase stop - # macos: - # name: xcodebuild (macOS latest) - # runs-on: macos-15 - # strategy: - # matrix: - # command: [test, ""] - # platform: [IOS, MACOS] - # xcode: ["26.0", "16.4"] - # include: - # - { command: test, skip_release: 1 } - # steps: - # - uses: actions/checkout@v5 - # - name: Select Xcode ${{ matrix.xcode }} - # run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app - # - name: List available devices - # run: xcrun simctl list devices available - # - name: Set IgnoreFileSystemDeviceInodeChanges flag - # run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES - # - name: Update mtime for incremental builds - # uses: chetan/git-restore-mtime-action@v2 - # - name: Debug - # run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" xcodebuild - # - name: Release - # if: matrix.skip_release != '1' - # run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Release PLATFORM="${{ matrix.platform }}" xcodebuild - # - name: Install lcov - # if: matrix.command == 'test' && matrix.platform == 'IOS' && matrix.xcode == '26.0' - # run: brew install lcov - # - name: Export code coverage - # id: coverage - # if: matrix.command == 'test' && matrix.platform == 'IOS' && matrix.xcode == '26.0' - # run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" coverage - # - uses: coverallsapp/github-action@v2.3.6 - # if: steps.coverage.outcome == 'success' - # with: - # github-token: ${{ secrets.GITHUB_TOKEN }} - # file: lcov.info + github-token: ${{ secrets.GITHUB_TOKEN }} + file: lcov.info - # macos-legacy: - # name: xcodebuild (macOS legacy) - # runs-on: macos-14 - # strategy: - # matrix: - # command: [test, ""] - # platform: [IOS, MACOS, MAC_CATALYST] - # xcode: ["15.4"] - # include: - # - { command: test, skip_release: 1 } - # steps: - # - uses: actions/checkout@v5 - # - name: Select Xcode ${{ matrix.xcode }} - # run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app - # - name: List available devices - # run: xcrun simctl list devices available - # - name: Cache derived data - # uses: actions/cache@v4 - # with: - # path: | - # ~/.derivedData - # key: | - # deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }} - # restore-keys: | - # deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}- - # - name: Set IgnoreFileSystemDeviceInodeChanges flag - # run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES - # - name: Update mtime for incremental builds - # uses: chetan/git-restore-mtime-action@v2 - # - name: Debug - # run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" xcodebuild - # - name: Release - # if: matrix.skip_release != '1' - # run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Release PLATFORM="${{ matrix.platform }}" xcodebuild + macos-legacy: + name: xcodebuild (macOS legacy) + runs-on: macos-14 + strategy: + matrix: + command: [test, ""] + platform: [IOS, MACOS, MAC_CATALYST] + xcode: ["15.4"] + include: + - { command: test, skip_release: 1 } + steps: + - uses: actions/checkout@v5 + - name: Select Xcode ${{ matrix.xcode }} + run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app + - name: List available devices + run: xcrun simctl list devices available + - name: Cache derived data + uses: actions/cache@v4 + with: + path: | + ~/.derivedData + key: | + deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }} + restore-keys: | + deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}- + - name: Set IgnoreFileSystemDeviceInodeChanges flag + run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES + - name: Update mtime for incremental builds + uses: chetan/git-restore-mtime-action@v2 + - name: Debug + run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" xcodebuild + - name: Release + if: matrix.skip_release != '1' + run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Release PLATFORM="${{ matrix.platform }}" xcodebuild - # spm: - # runs-on: macos-15 - # strategy: - # matrix: - # config: [debug, release] - # steps: - # - uses: actions/checkout@v5 - # - uses: actions/cache@v4 - # with: - # path: .build - # key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} - # restore-keys: | - # ${{ runner.os }}-spm- - # - run: swift build -c ${{ matrix.config }} + spm: + runs-on: macos-15 + strategy: + matrix: + config: [debug, release] + steps: + - uses: actions/checkout@v5 + - uses: actions/cache@v4 + with: + path: .build + key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} + restore-keys: | + ${{ runner.os }}-spm- + - run: swift build -c ${{ matrix.config }} - # linux: - # name: Linux + linux: + name: Linux + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - name: "Remove IntegrationTests" + run: rm -r Tests/IntegrationTests/* + - name: "Build Swift Package" + run: swift build + + # android: + # name: Android # runs-on: ubuntu-latest # steps: # - uses: actions/checkout@v5 # - name: "Remove IntegrationTests" # run: rm -r Tests/IntegrationTests/* - # - name: "Build Swift Package" - # run: swift build - - # # android: - # # name: Android - # # runs-on: ubuntu-latest - # # steps: - # # - uses: actions/checkout@v5 - # # - name: "Remove IntegrationTests" - # # run: rm -r Tests/IntegrationTests/* - # # - name: "Test Swift Package" - # # uses: skiptools/swift-android-action@v2 - # # with: - # # # need to copy over the Tests folder because it contains __Snapshots__ - # # copy-files: Tests - # # # tests are not yet passing on Android - # # run-tests: false + # - name: "Test Swift Package" + # uses: skiptools/swift-android-action@v2 + # with: + # # need to copy over the Tests folder because it contains __Snapshots__ + # copy-files: Tests + # # tests are not yet passing on Android + # run-tests: false - # library-evolution: - # name: Library (evolution) - # runs-on: macos-15 - # strategy: - # matrix: - # xcode: ["16.3"] - # steps: - # - uses: actions/checkout@v5 - # - name: Select Xcode ${{ matrix.xcode }} - # run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app - # - name: Build for library evolution - # run: make build-for-library-evolution + library-evolution: + name: Library (evolution) + runs-on: macos-15 + strategy: + matrix: + xcode: ["16.3"] + steps: + - uses: actions/checkout@v5 + - name: Select Xcode ${{ matrix.xcode }} + run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app + - name: Build for library evolution + run: make build-for-library-evolution - # examples: - # name: Examples - # runs-on: macos-15 - # steps: - # - uses: actions/checkout@v5 - # - name: Cache derived data - # uses: actions/cache@v4 - # with: - # path: ~/.derivedData - # key: | - # deriveddata-examples-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift', '**/Examples/**/*.swift') }} - # restore-keys: | - # deriveddata-examples- - # - name: Select Xcode 16.3 - # run: sudo xcode-select -s /Applications/Xcode_16.3.app - # - name: Set IgnoreFileSystemDeviceInodeChanges flag - # run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES - # - name: Update mtime for incremental builds - # uses: chetan/git-restore-mtime-action@v2 - # - name: Examples - # run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="Examples" XCODEBUILD_ARGUMENT=build xcodebuild - # - name: SlackClone - # run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="SlackClone" XCODEBUILD_ARGUMENT=build xcodebuild - # - name: UserManagement - # run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="UserManagement" XCODEBUILD_ARGUMENT=build xcodebuild + examples: + name: Examples + runs-on: macos-15 + steps: + - uses: actions/checkout@v5 + - name: Cache derived data + uses: actions/cache@v4 + with: + path: ~/.derivedData + key: | + deriveddata-examples-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift', '**/Examples/**/*.swift') }} + restore-keys: | + deriveddata-examples- + - name: Select Xcode 16.3 + run: sudo xcode-select -s /Applications/Xcode_16.3.app + - name: Set IgnoreFileSystemDeviceInodeChanges flag + run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES + - name: Update mtime for incremental builds + uses: chetan/git-restore-mtime-action@v2 + - name: Examples + run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="Examples" XCODEBUILD_ARGUMENT=build xcodebuild + - name: SlackClone + run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="SlackClone" XCODEBUILD_ARGUMENT=build xcodebuild + - name: UserManagement + run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="UserManagement" XCODEBUILD_ARGUMENT=build xcodebuild - # docs: - # name: Test docs - # runs-on: macos-15 - # steps: - # - uses: actions/checkout@v5 - # - name: Test docs - # run: make test-docs + docs: + name: Test docs + runs-on: macos-15 + steps: + - uses: actions/checkout@v5 + - name: Test docs + run: make test-docs diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..629e405b --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +on: + workflow_dispatch: + push: + branches: + - "main" + pull_request: + + jobs: + setup-docker: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-13, macos-15-intel, macos-15] + name: A job to perform a self-test on this Github Action + steps: + # To use this repository's private action, + # you must check out the repository + - name: Checkout + uses: actions/checkout@v5 + - name: Setup Docker on macOS using Colima, Lima-VM, and Homebrew. + uses: ./ # Uses an action in the root directory + id: docker + - name: Get the Docker client version + run: | + echo "Docker client version: ${{ steps.docker.outputs.docker-client-version }}" + - name: Get the Colima version + run: | + echo "Colima version: ${{ steps.docker.outputs.colima-version }}" \ No newline at end of file From 4ddce063282a4f35747a567d5b2f5e1bebd3f38b Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Tue, 7 Oct 2025 16:50:00 -0300 Subject: [PATCH 3/5] use correct action --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 629e405b..91f59440 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ on: - name: Checkout uses: actions/checkout@v5 - name: Setup Docker on macOS using Colima, Lima-VM, and Homebrew. - uses: ./ # Uses an action in the root directory + uses: douglascamata/setup-docker-macos-action@v1 id: docker - name: Get the Docker client version run: | From 5948a39e8c245b143786aab599c405fc0833c8f2 Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Tue, 7 Oct 2025 16:50:48 -0300 Subject: [PATCH 4/5] wip --- .github/workflows/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 91f59440..f628fefb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,9 @@ on: branches: - "main" pull_request: - + branches: + - main + jobs: setup-docker: runs-on: ${{ matrix.os }} @@ -26,4 +28,4 @@ on: echo "Docker client version: ${{ steps.docker.outputs.docker-client-version }}" - name: Get the Colima version run: | - echo "Colima version: ${{ steps.docker.outputs.colima-version }}" \ No newline at end of file + echo "Colima version: ${{ steps.docker.outputs.colima-version }}" From 0689a933301d11135a3cf6502777acd0a25ccb64 Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Tue, 7 Oct 2025 16:52:11 -0300 Subject: [PATCH 5/5] fix yaml --- .github/workflows/test.yml | 50 +++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f628fefb..18611f88 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,31 +1,31 @@ on: workflow_dispatch: push: - branches: - - "main" + branches: + - "main" pull_request: - branches: - - main + branches: + - main - jobs: +jobs: setup-docker: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-13, macos-15-intel, macos-15] - name: A job to perform a self-test on this Github Action - steps: - # To use this repository's private action, - # you must check out the repository - - name: Checkout - uses: actions/checkout@v5 - - name: Setup Docker on macOS using Colima, Lima-VM, and Homebrew. - uses: douglascamata/setup-docker-macos-action@v1 - id: docker - - name: Get the Docker client version - run: | - echo "Docker client version: ${{ steps.docker.outputs.docker-client-version }}" - - name: Get the Colima version - run: | - echo "Colima version: ${{ steps.docker.outputs.colima-version }}" + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-13, macos-15-intel, macos-15] + name: A job to perform a self-test on this Github Action + steps: + # To use this repository's private action, + # you must check out the repository + - name: Checkout + uses: actions/checkout@v5 + - name: Setup Docker on macOS using Colima, Lima-VM, and Homebrew. + uses: douglascamata/setup-docker-macos-action@v1 + id: docker + - name: Get the Docker client version + run: | + echo "Docker client version: ${{ steps.docker.outputs.docker-client-version }}" + - name: Get the Colima version + run: | + echo "Colima version: ${{ steps.docker.outputs.colima-version }}"