Skip to content

Updates to align with FOSUtilities documentation #21

Updates to align with FOSUtilities documentation

Updates to align with FOSUtilities documentation #21

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
jobs:
run_tests:
name: Test Swift v${{ matrix.swift }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest] #, windows-latest]
swift: ["6.0.3"]
fail-fast: false
steps:
- uses: SwiftyLab/setup-swift@latest
with:
development: true
swift-version: ${{ matrix.swift }}
- uses: actions/checkout@v2
- name: Run Tests
run: |
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
swift build
else
swift test
fi
shell: bash
# Ensure that compilation succeeds on iOS-based platforms
run_ios_build_tests:
name: Test ${{ matrix.ios_platform }} on Xcode v${{ matrix.xcode_version }}
runs-on: macos-latest
strategy:
matrix:
ios_platform: ["ios", "watchos", "tvos"] # , "visionos"]
xcode_version: ["16.0"]
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode_version }}
- uses: actions/checkout@v2
- name: Install xcpretty
run: |
gem install xcpretty --silent --quiet --no-document
- name: Run ${{ matrix.ios_platform }} Tests
run: xcrun xcodebuild -IDEClonedSourcePackagesDirPathOverride="$PWD/.dependencies" -derivedDataPath "$PWD/.derivedData" build -scheme FOSUtilities-Package -destination "generic/platform=${{ matrix.ios_platform }}" | xcpretty
#####################################
# swift 5.8 has removed generate-xcodeproj, so we'll need to find a different
# way to do this. I'm sure there will be an update soon.
#####################################
# analyze_code_coverage:
# runs-on: macos-12
# steps:
# - uses: actions/checkout@v2
# - name: Generate an xcodeproj
# run: swift package generate-xcodeproj
# - name: Run Tests w/ code coverage
# run: xcodebuild test -scheme CryptoScraper-Package -destination platform="macOS" -enableCodeCoverage YES
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v3