Skip to content

Commit 1bde1f8

Browse files
committed
test docker
1 parent 913ee70 commit 1bde1f8

File tree

2 files changed

+173
-155
lines changed

2 files changed

+173
-155
lines changed

.github/workflows/ci.yml

Lines changed: 144 additions & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -43,173 +43,162 @@ permissions:
4343
contents: read
4444

4545
jobs:
46-
supabase-cli-test:
46+
macos:
47+
name: xcodebuild (macOS latest)
4748
runs-on: macos-15
49+
strategy:
50+
matrix:
51+
command: [test, ""]
52+
platform: [IOS, MACOS]
53+
xcode: ["26.0", "16.4"]
54+
include:
55+
- { command: test, skip_release: 1 }
4856
steps:
4957
- uses: actions/checkout@v5
50-
- uses: supabase/setup-cli@v1
58+
- name: Select Xcode ${{ matrix.xcode }}
59+
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
60+
- name: List available devices
61+
run: xcrun simctl list devices available
62+
- name: Set IgnoreFileSystemDeviceInodeChanges flag
63+
run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
64+
- name: Update mtime for incremental builds
65+
uses: chetan/git-restore-mtime-action@v2
66+
- name: Debug
67+
run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" xcodebuild
68+
- name: Release
69+
if: matrix.skip_release != '1'
70+
run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Release PLATFORM="${{ matrix.platform }}" xcodebuild
71+
- name: Install lcov
72+
if: matrix.command == 'test' && matrix.platform == 'IOS' && matrix.xcode == '26.0'
73+
run: brew install lcov
74+
- name: Export code coverage
75+
id: coverage
76+
if: matrix.command == 'test' && matrix.platform == 'IOS' && matrix.xcode == '26.0'
77+
run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" coverage
78+
- uses: coverallsapp/[email protected]
79+
if: steps.coverage.outcome == 'success'
5180
with:
52-
version: latest
53-
- run: supabase start
54-
- run: supabase db reset
55-
- run: swift test --filter IntegrationTests
56-
- run: supabase stop
57-
# macos:
58-
# name: xcodebuild (macOS latest)
59-
# runs-on: macos-15
60-
# strategy:
61-
# matrix:
62-
# command: [test, ""]
63-
# platform: [IOS, MACOS]
64-
# xcode: ["26.0", "16.4"]
65-
# include:
66-
# - { command: test, skip_release: 1 }
67-
# steps:
68-
# - uses: actions/checkout@v5
69-
# - name: Select Xcode ${{ matrix.xcode }}
70-
# run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
71-
# - name: List available devices
72-
# run: xcrun simctl list devices available
73-
# - name: Set IgnoreFileSystemDeviceInodeChanges flag
74-
# run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
75-
# - name: Update mtime for incremental builds
76-
# uses: chetan/git-restore-mtime-action@v2
77-
# - name: Debug
78-
# run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" xcodebuild
79-
# - name: Release
80-
# if: matrix.skip_release != '1'
81-
# run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Release PLATFORM="${{ matrix.platform }}" xcodebuild
82-
# - name: Install lcov
83-
# if: matrix.command == 'test' && matrix.platform == 'IOS' && matrix.xcode == '26.0'
84-
# run: brew install lcov
85-
# - name: Export code coverage
86-
# id: coverage
87-
# if: matrix.command == 'test' && matrix.platform == 'IOS' && matrix.xcode == '26.0'
88-
# run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" coverage
89-
# - uses: coverallsapp/[email protected]
90-
# if: steps.coverage.outcome == 'success'
91-
# with:
92-
# github-token: ${{ secrets.GITHUB_TOKEN }}
93-
# file: lcov.info
81+
github-token: ${{ secrets.GITHUB_TOKEN }}
82+
file: lcov.info
9483

95-
# macos-legacy:
96-
# name: xcodebuild (macOS legacy)
97-
# runs-on: macos-14
98-
# strategy:
99-
# matrix:
100-
# command: [test, ""]
101-
# platform: [IOS, MACOS, MAC_CATALYST]
102-
# xcode: ["15.4"]
103-
# include:
104-
# - { command: test, skip_release: 1 }
105-
# steps:
106-
# - uses: actions/checkout@v5
107-
# - name: Select Xcode ${{ matrix.xcode }}
108-
# run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
109-
# - name: List available devices
110-
# run: xcrun simctl list devices available
111-
# - name: Cache derived data
112-
# uses: actions/cache@v4
113-
# with:
114-
# path: |
115-
# ~/.derivedData
116-
# key: |
117-
# deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }}
118-
# restore-keys: |
119-
# deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-
120-
# - name: Set IgnoreFileSystemDeviceInodeChanges flag
121-
# run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
122-
# - name: Update mtime for incremental builds
123-
# uses: chetan/git-restore-mtime-action@v2
124-
# - name: Debug
125-
# run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" xcodebuild
126-
# - name: Release
127-
# if: matrix.skip_release != '1'
128-
# run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Release PLATFORM="${{ matrix.platform }}" xcodebuild
84+
macos-legacy:
85+
name: xcodebuild (macOS legacy)
86+
runs-on: macos-14
87+
strategy:
88+
matrix:
89+
command: [test, ""]
90+
platform: [IOS, MACOS, MAC_CATALYST]
91+
xcode: ["15.4"]
92+
include:
93+
- { command: test, skip_release: 1 }
94+
steps:
95+
- uses: actions/checkout@v5
96+
- name: Select Xcode ${{ matrix.xcode }}
97+
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
98+
- name: List available devices
99+
run: xcrun simctl list devices available
100+
- name: Cache derived data
101+
uses: actions/cache@v4
102+
with:
103+
path: |
104+
~/.derivedData
105+
key: |
106+
deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }}
107+
restore-keys: |
108+
deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-
109+
- name: Set IgnoreFileSystemDeviceInodeChanges flag
110+
run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
111+
- name: Update mtime for incremental builds
112+
uses: chetan/git-restore-mtime-action@v2
113+
- name: Debug
114+
run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" xcodebuild
115+
- name: Release
116+
if: matrix.skip_release != '1'
117+
run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Release PLATFORM="${{ matrix.platform }}" xcodebuild
129118

130-
# spm:
131-
# runs-on: macos-15
132-
# strategy:
133-
# matrix:
134-
# config: [debug, release]
135-
# steps:
136-
# - uses: actions/checkout@v5
137-
# - uses: actions/cache@v4
138-
# with:
139-
# path: .build
140-
# key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
141-
# restore-keys: |
142-
# ${{ runner.os }}-spm-
143-
# - run: swift build -c ${{ matrix.config }}
119+
spm:
120+
runs-on: macos-15
121+
strategy:
122+
matrix:
123+
config: [debug, release]
124+
steps:
125+
- uses: actions/checkout@v5
126+
- uses: actions/cache@v4
127+
with:
128+
path: .build
129+
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
130+
restore-keys: |
131+
${{ runner.os }}-spm-
132+
- run: swift build -c ${{ matrix.config }}
144133

145-
# linux:
146-
# name: Linux
134+
linux:
135+
name: Linux
136+
runs-on: ubuntu-latest
137+
steps:
138+
- uses: actions/checkout@v5
139+
- name: "Remove IntegrationTests"
140+
run: rm -r Tests/IntegrationTests/*
141+
- name: "Build Swift Package"
142+
run: swift build
143+
144+
# android:
145+
# name: Android
147146
# runs-on: ubuntu-latest
148147
# steps:
149148
# - uses: actions/checkout@v5
150149
# - name: "Remove IntegrationTests"
151150
# run: rm -r Tests/IntegrationTests/*
152-
# - name: "Build Swift Package"
153-
# run: swift build
154-
155-
# # android:
156-
# # name: Android
157-
# # runs-on: ubuntu-latest
158-
# # steps:
159-
# # - uses: actions/checkout@v5
160-
# # - name: "Remove IntegrationTests"
161-
# # run: rm -r Tests/IntegrationTests/*
162-
# # - name: "Test Swift Package"
163-
# # uses: skiptools/swift-android-action@v2
164-
# # with:
165-
# # # need to copy over the Tests folder because it contains __Snapshots__
166-
# # copy-files: Tests
167-
# # # tests are not yet passing on Android
168-
# # run-tests: false
151+
# - name: "Test Swift Package"
152+
# uses: skiptools/swift-android-action@v2
153+
# with:
154+
# # need to copy over the Tests folder because it contains __Snapshots__
155+
# copy-files: Tests
156+
# # tests are not yet passing on Android
157+
# run-tests: false
169158

170-
# library-evolution:
171-
# name: Library (evolution)
172-
# runs-on: macos-15
173-
# strategy:
174-
# matrix:
175-
# xcode: ["16.3"]
176-
# steps:
177-
# - uses: actions/checkout@v5
178-
# - name: Select Xcode ${{ matrix.xcode }}
179-
# run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
180-
# - name: Build for library evolution
181-
# run: make build-for-library-evolution
159+
library-evolution:
160+
name: Library (evolution)
161+
runs-on: macos-15
162+
strategy:
163+
matrix:
164+
xcode: ["16.3"]
165+
steps:
166+
- uses: actions/checkout@v5
167+
- name: Select Xcode ${{ matrix.xcode }}
168+
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
169+
- name: Build for library evolution
170+
run: make build-for-library-evolution
182171

183-
# examples:
184-
# name: Examples
185-
# runs-on: macos-15
186-
# steps:
187-
# - uses: actions/checkout@v5
188-
# - name: Cache derived data
189-
# uses: actions/cache@v4
190-
# with:
191-
# path: ~/.derivedData
192-
# key: |
193-
# deriveddata-examples-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift', '**/Examples/**/*.swift') }}
194-
# restore-keys: |
195-
# deriveddata-examples-
196-
# - name: Select Xcode 16.3
197-
# run: sudo xcode-select -s /Applications/Xcode_16.3.app
198-
# - name: Set IgnoreFileSystemDeviceInodeChanges flag
199-
# run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
200-
# - name: Update mtime for incremental builds
201-
# uses: chetan/git-restore-mtime-action@v2
202-
# - name: Examples
203-
# run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="Examples" XCODEBUILD_ARGUMENT=build xcodebuild
204-
# - name: SlackClone
205-
# run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="SlackClone" XCODEBUILD_ARGUMENT=build xcodebuild
206-
# - name: UserManagement
207-
# run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="UserManagement" XCODEBUILD_ARGUMENT=build xcodebuild
172+
examples:
173+
name: Examples
174+
runs-on: macos-15
175+
steps:
176+
- uses: actions/checkout@v5
177+
- name: Cache derived data
178+
uses: actions/cache@v4
179+
with:
180+
path: ~/.derivedData
181+
key: |
182+
deriveddata-examples-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift', '**/Examples/**/*.swift') }}
183+
restore-keys: |
184+
deriveddata-examples-
185+
- name: Select Xcode 16.3
186+
run: sudo xcode-select -s /Applications/Xcode_16.3.app
187+
- name: Set IgnoreFileSystemDeviceInodeChanges flag
188+
run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
189+
- name: Update mtime for incremental builds
190+
uses: chetan/git-restore-mtime-action@v2
191+
- name: Examples
192+
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="Examples" XCODEBUILD_ARGUMENT=build xcodebuild
193+
- name: SlackClone
194+
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="SlackClone" XCODEBUILD_ARGUMENT=build xcodebuild
195+
- name: UserManagement
196+
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="UserManagement" XCODEBUILD_ARGUMENT=build xcodebuild
208197

209-
# docs:
210-
# name: Test docs
211-
# runs-on: macos-15
212-
# steps:
213-
# - uses: actions/checkout@v5
214-
# - name: Test docs
215-
# run: make test-docs
198+
docs:
199+
name: Test docs
200+
runs-on: macos-15
201+
steps:
202+
- uses: actions/checkout@v5
203+
- name: Test docs
204+
run: make test-docs

.github/workflows/test.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
on:
2+
workflow_dispatch:
3+
push:
4+
branches:
5+
- "main"
6+
pull_request:
7+
8+
jobs:
9+
setup-docker:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: [macos-13, macos-15-intel, macos-15]
15+
name: A job to perform a self-test on this Github Action
16+
steps:
17+
# To use this repository's private action,
18+
# you must check out the repository
19+
- name: Checkout
20+
uses: actions/checkout@v5
21+
- name: Setup Docker on macOS using Colima, Lima-VM, and Homebrew.
22+
uses: ./ # Uses an action in the root directory
23+
id: docker
24+
- name: Get the Docker client version
25+
run: |
26+
echo "Docker client version: ${{ steps.docker.outputs.docker-client-version }}"
27+
- name: Get the Colima version
28+
run: |
29+
echo "Colima version: ${{ steps.docker.outputs.colima-version }}"

0 commit comments

Comments
 (0)