chore: update github action and badges in README #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | ||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
jobs: | ||
build: | ||
if: "!contains(github.event.head_commit.message, '[skip-ci]')" | ||
name: Run test on ${{ matrix.os }} with Xcode ${{ matrix.xcode-version }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: macos-15 | ||
xcode-version: '16.3' | ||
swift-version: '6.0' | ||
destination: 'platform=iOS Simulator,name=iPhone 16,OS=18.2' | ||
- os: macos-14 | ||
xcode-version: '15.4' | ||
swift-version: '5.10' | ||
destination: 'platform=iOS Simulator,name=iPhone 15,OS=17.2' | ||
- os: macos-14 | ||
xcode-version: '15.2' | ||
swift-version: '5.9' | ||
destination: 'platform=iOS Simulator,name=iPhone 15,OS=17.2' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Swift | ||
uses: swift-actions/setup-swift@v1 | ||
- name: Select Xcode Version | ||
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode-version }}.app | ||
- name: List available simulators | ||
run: xcrun simctl list | ||
- name: Build | ||
run: | | ||
xcodebuild build-for-testing \ | ||
-scheme VWO-FME \ | ||
-sdk iphonesimulator \ | ||
-configuration Debug | ||
- name: Test with Coverage | ||
run: | | ||
xcodebuild test \ | ||
-scheme VWO-FMETests \ | ||
-destination '${{ matrix.destination }}' \ | ||
-sdk iphonesimulator \ | ||
-configuration Debug \ | ||
-enableCodeCoverage YES \ | ||
-resultBundlePath ./TestResults.xcresult | ||
- name: Generate Coverage Report | ||
run: | | ||
xcrun xccov view --report --files-for-target VWO-FME ./TestResults.xcresult | ||
- name: Notification | ||
if: always() | ||
id: slack | ||
uses: wingify/[email protected] | ||
with: | ||
channel-id: 'vwo-fs-fme-sdk-job-status' | ||
slack-message: "<!here> iOS FME SDK Test on *macOS-${{ matrix.os }}* and *Xcode-${{ matrix.xcode-version }}* got *${{ job.status }}* ${{ job.status == 'success' && ':heavy_check_mark:' || ':x:' }} \nCommit: `${{ github.event.head_commit.message }}`. \nCheck the latest build: https://github.com/wingify/vwo-fme-ios-sdk/actions" | ||
color: "${{ job.status == 'success' && '#00FF00' || '#FF0000' }}" | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} |