Skip to content
Merged
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
66 changes: 66 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Tests

on:
pull_request:
branches: [main]
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: macos-15
steps:
- uses: actions/checkout@v4

- name: Clone sibling packages
run: |
git clone https://github.com/torlando-tech/reticulum-swift.git ../reticulum-swift
git clone https://github.com/torlando-tech/LXMF-swift.git ../LXMF-swift
git clone https://github.com/torlando-tech/LXST-swift.git ../LXST-swift
Comment on lines +20 to +23
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Sibling packages cloned at HEAD without pinning

The three sibling repos are cloned without specifying a branch, tag, or commit SHA, so every CI run always uses the latest HEAD of each package's default branch. If someone pushes a breaking change to reticulum-swift, LXMF-swift, or LXST-swift, this workflow will start failing even though nothing in columba-ios changed, making it hard to tell whether the failure is local or upstream.

Consider pinning to a specific branch or ref so the build is reproducible and failures are attributable:

git clone --branch main --single-branch https://github.com/torlando-tech/reticulum-swift.git ../reticulum-swift
git clone --branch main --single-branch https://github.com/torlando-tech/LXMF-swift.git ../LXMF-swift
git clone --branch main --single-branch https://github.com/torlando-tech/LXST-swift.git ../LXST-swift

Or, if full reproducibility is needed, add a step that resolves and records the HEAD SHAs of each sibling so failed runs can be replicated exactly.


- name: Select Xcode
run: |
XCODE=$(ls -d /Applications/Xcode_16*.app 2>/dev/null | sort -V | tail -1)
echo "Using $XCODE"
sudo xcode-select -s "$XCODE"
xcodebuild -version

- name: Find simulator
id: sim
run: |
DEVICE_ID=$(xcrun simctl list devices available -j \
| python3 -c "import sys,json; devs=json.load(sys.stdin)['devices']; print(next(d['udid'] for rt in devs for d in devs[rt] if 'iPhone' in d['name']))")
echo "device_id=$DEVICE_ID" >> "$GITHUB_OUTPUT"
echo "Using simulator: $DEVICE_ID"

- name: Build
run: |
xcodebuild build \
-project ColumbaApp.xcodeproj \
-scheme ColumbaApp \
-sdk iphonesimulator \
-destination "id=${{ steps.sim.outputs.device_id }}" \
CODE_SIGN_IDENTITY=- \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=YES \
DEVELOPMENT_TEAM="" \
PROVISIONING_PROFILE_SPECIFIER=""

- name: Build and run tests
run: |
xcodebuild test \
-project ColumbaApp.xcodeproj \
-scheme ColumbaApp \
-sdk iphonesimulator \
-destination "id=${{ steps.sim.outputs.device_id }}" \
-only-testing:ColumbaAppTests \
-resultBundlePath TestResults.xcresult \
CODE_SIGN_IDENTITY=- \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=YES \
DEVELOPMENT_TEAM="" \
PROVISIONING_PROFILE_SPECIFIER=""
Loading