Skip to content

Commit

Permalink
Configure Test Action
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieobject committed Feb 22, 2024
1 parent 880ec58 commit fd6b17b
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 2 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
11 changes: 10 additions & 1 deletion dev/local/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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

0 comments on commit fd6b17b

Please sign in to comment.