Skip to content

External tests

External tests #60

name: External tests
on:
schedule:
- cron: '0 14 * * *' # Runs at 14:00 CET daily
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-test:
runs-on: macos-latest
strategy:
matrix:
repo:
- 'eonist/FileSugar'
- 'eonist/JSONSugar'
- 'eonist/ClipboardSugar'
- 'sentryco/Telemetric'
- 'sentryco/CrashKit'
# - 'sentryco/NetTime' # this is private now
- 'sentryco/UpgradeAlert'
- 'sentryco/Logger'
- 'eonist/With'
- 'eonist/WizardHelper'
- 'eonist/TestRunner'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: ${{ matrix.repo }}
- name: Set up Swift
uses: fwal/setup-swift@v1
with:
swift-version: '5.9'
- name: Build
run: swift build -v
- name: Check for tests
id: check_tests
run: |
if ls Tests/**/*.swift > /dev/null 2>&1; then
echo "has_tests=true" >> $GITHUB_OUTPUT
else
echo "has_tests=false" >> $GITHUB_OUTPUT
fi
- name: Run tests
if: steps.check_tests.outputs.has_tests == 'true'
run: swift test -v
- name: Clean up orphan processes
if: always()
run: |
pkill -P $$ || true
echo "Cleaned up orphan processes"