Implement ServiceLocator
framework
#2
Workflow file for this run
This file contains 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: service-locator | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: | |
paths: | |
- ".github/workflows/**" | |
- "ServiceLocator/**" | |
- "ServiceLocatorTests/**" | |
jobs: | |
macOS: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.runsOn }} | |
env: | |
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- xcode: "Xcode_15.0" | |
runsOn: macos-13 | |
name: "macOS 13, Xcode 15.0" | |
- xcode: "Xcode_14.3.1" | |
runsOn: macos-13 | |
name: "macOS 13, Xcode 14.3.1" | |
- xcode: "Xcode_14.2" | |
runsOn: macOS-12 | |
name: "macOS 12, Xcode 14.2" | |
- xcode: "Xcode_14.1" | |
runsOn: macOS-12 | |
name: "macOS 12, Xcode 14.1" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: brew bundle | |
- name: Generate project | |
run: xcodegen generate | |
- name: ${{ matrix.name }} | |
run: xcodebuild test -scheme "ServiceLocator" -destination "platform=macOS" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
xcode: true | |
xcode_archive_path: test_output/${{ matrix.name }}.xcresult | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.name }} | |
path: test_output | |
iOS: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.runsOn }} | |
env: | |
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- destination: "OS=17.0.1,name=iPhone 14 Pro" | |
name: "iOS 17.0.1" | |
xcode: "Xcode_15.0" | |
runsOn: macos-13 | |
- destination: "OS=16.4,name=iPhone 14 Pro" | |
name: "iOS 16.4" | |
xcode: "Xcode_14.3.1" | |
runsOn: macos-13 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: brew bundle | |
- name: Generate project | |
run: xcodegen generate | |
- name: ${{ matrix.name }} | |
run: xcodebuild test -scheme "ServiceLocator" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
xcode: true | |
xcode_archive_path: test_output/${{ matrix.name }}.xcresult | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.name }} | |
path: test_output | |
tvOS: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.runsOn }} | |
env: | |
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- destination: "OS=17.0,name=Apple TV" | |
name: "tvOS 17.0" | |
xcode: "Xcode_15.0" | |
runsOn: macos-13 | |
- destination: "OS=16.4,name=Apple TV" | |
name: "tvOS 16.4" | |
xcode: "Xcode_14.3.1" | |
runsOn: macos-13 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: brew bundle | |
- name: Generate project | |
run: xcodegen generate | |
- name: ${{ matrix.name }} | |
run: xcodebuild test -scheme "ServiceLocator" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
xcode: true | |
xcode_archive_path: test_output/${{ matrix.name }}.xcresult | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.name }} | |
path: test_output | |
watchOS: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.runsOn }} | |
env: | |
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- destination: "OS=10.0,name=Apple Watch Series 9 (45mm)" | |
name: "watchOS 10.0" | |
xcode: "Xcode_15.0" | |
runsOn: macos-13 | |
- destination: "OS=9.4,name=Apple Watch Series 8 (45mm)" | |
name: "watchOS 9.4" | |
xcode: "Xcode_14.3.1" | |
runsOn: macos-13 | |
- destination: "OS=8.5,name=Apple Watch Series 7 (45mm)" | |
name: "watchOS 8.5" | |
xcode: "Xcode_14.3.1" | |
runsOn: macos-13 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: brew bundle | |
- name: Generate project | |
run: xcodegen generate | |
- name: ${{ matrix.name }} | |
run: xcodebuild test -scheme "ServiceLocator" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
xcode: true | |
xcode_archive_path: test_output/${{ matrix.name }}.xcresult | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.name }} | |
path: test_output | |
merge-test-reports: | |
needs: [iOS, macOS, watchOS, tvOS] | |
runs-on: macos-13 | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: test_output | |
- run: xcrun xcresulttool merge test_output/**/*.xcresult --output-path test_output/final/final.xcresult | |
- name: Upload Merged Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: MergedResult | |
path: test_output/final | |
discover-typos: | |
name: Discover Typos | |
runs-on: macOS-12 | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Discover typos | |
run: | | |
export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.11/bin" | |
python3 -m pip install --upgrade pip | |
python3 -m pip install codespell | |
codespell --ignore-words-list="hart,inout,msdos,sur" --skip="./.build/*,./.git/*" |