diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..4e4d0aac --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,44 @@ +name: iOS Tests + +# temporary for manual trigger +#on: +# workflow_dispatch: + +on: + push: +# branches: +# - main +# pull_request: + +env: + GPR_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GPR_USER: ${{ secrets.GITHUB_ACTOR }} + +jobs: + ios-tests: + name: iOS Tests + runs-on: macos-latest + + steps: + - name: Checkout project sources + uses: actions/checkout@v3 + + - name: Install docker + run: brew install docker docker-compose + + - name: Start colima + run: colima start + + - name: Start local test server + run: docker-compose -p xmtp -f dev/local/docker-compose.yml up -d + + - name: Test with xcodebuild + run: xcodebuild test -scheme XMTP -destination "platform=iOS Simulator,name=iPhone 15" + +# - name: Build +# run: swift build --vv +# - name: Run tests +# run: swift test -v + + - name: Stop local test server + run: docker-compose -p xmtp -f dev/local/docker-compose.yml down \ No newline at end of file diff --git a/Package.swift b/Package.swift index 66509435..6d45c0ec 100644 --- a/Package.swift +++ b/Package.swift @@ -25,7 +25,7 @@ let package = Package( .package(url: "https://github.com/1024jp/GzipSwift", from: "5.2.0"), .package(url: "https://github.com/bufbuild/connect-swift", exact: "0.3.0"), .package(url: "https://github.com/apple/swift-docc-plugin.git", from: "1.0.0"), - .package(url: "https://github.com/xmtp/libxmtp-swift", exact: "0.4.2-beta3"), + .package(url: "https://github.com/xmtp/libxmtp-swift", exact: "0.4.2-beta2"), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/dev/local/docker-compose.yml b/dev/local/docker-compose.yml index 90f2ed4f..8eb6dd4c 100644 --- a/dev/local/docker-compose.yml +++ b/dev/local/docker-compose.yml @@ -1,7 +1,8 @@ version: "3.8" services: wakunode: - image: xmtp/node-go + image: xmtp/node-go:latest + platform: linux/amd64 environment: - GOWAKU-NODEKEY=8a30dcb604b0b53627a5adc054dbf434b446628d4bd1eccc681d223f0550ce67 command: @@ -25,3 +26,11 @@ services: image: postgres:13 environment: POSTGRES_PASSWORD: xmtp + js: + restart: always + platform: linux/amd64 + depends_on: + wakunode: + condition: service_healthy + build: ./../test + \ No newline at end of file