Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 11 additions & 51 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: iOS Integration Tests

on:
push:
branches:
Expand All @@ -8,73 +9,32 @@ on:
env:
GPR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPR_USER: ${{ secrets.GITHUB_ACTOR }}
jobs:

jobs:
ios-tests:
name: iOS Tests
# macos-14 currently breaks Colima
runs-on: macos-13

steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.2'

- name: Checkout project sources
uses: actions/checkout@v3

# This step and the Install Colima step have been modified to address a
# Python error started 3.11.2024, emitting the following error:
#
# Error: The `brew link` step did not complete successfully
# The formula built, but is not symlinked into /usr/local
# Could not symlink bin/2to3
#
# Others reported: https://github.com/Cockatrice/Cockatrice/issues/5007
#
# Once the fix enters the Homebrew pipeline, it is safe to remove this.
#
# Note: Upgrading to a macos-14 runner fixes this, but Colima still
# can't install on macos-14 due to virtualization issues.
- name: Homebrew Workaround - Temporary
#run: brew update && brew upgrade && brew cleanup
run: |
brew update
rm '/usr/local/bin/2to3'
rm '/usr/local/bin/2to3-3.12'
rm '/usr/local/bin/idle3'
rm '/usr/local/bin/idle3.12'
rm '/usr/local/bin/pydoc3'
rm '/usr/local/bin/pydoc3.12'
rm '/usr/local/bin/python3'
rm '/usr/local/bin/python3-config'
rm '/usr/local/bin/python3.12'
rm '/usr/local/bin/python3.12-config'
rm '/usr/local/share/man/man1/python3.1'
rm '/usr/local/lib/pkgconfig/python3-embed.pc'
rm '/usr/local/lib/pkgconfig/python3.pc'
rm '/usr/local/Frameworks/Python.framework/Headers'
rm '/usr/local/Frameworks/Python.framework/Python'
rm '/usr/local/Frameworks/Python.framework/Resources'
rm '/usr/local/Frameworks/Python.framework/Versions/Current'

- name: Install colima
run: |
brew install colima || true
brew link --overwrite python@3.11

- name: Install docker
run: brew install docker docker-compose

- name: Start colima
- name: Set up Docker
run: brew install docker colima docker-compose

- name: Start Colima
run: colima start

- name: Start Docker containers
run: dev/up
run: ./dev/up

# retries are added due to test failures with dependencies
- name: Run tests
run: script/run_tests.sh
run: xcodebuild test -scheme XMTP -destination "platform=iOS Simulator,name=iPhone 14"

- name: Stop local test server
run: docker-compose -p xmtp-ios -f dev/local/docker-compose.yml down
4 changes: 2 additions & 2 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions dev/local/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@ services:
image: postgres:13
environment:
POSTGRES_PASSWORD: xmtp

history-server:
image: ghcr.io/xmtp/message-history-server:main
platform: linux/amd64
ports:
- 5558:5558
2 changes: 1 addition & 1 deletion dev/local/up
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ set -eou pipefail
script_dir="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"

"${script_dir}"/compose pull
"${script_dir}"/compose up -d --build
"${script_dir}"/compose up -d --wait
24 changes: 0 additions & 24 deletions pull-request-template.md

This file was deleted.

Loading