Skip to content

Commit

Permalink
👷 Updated workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
jobearrr committed Jun 23, 2024
1 parent 6a91e0a commit 57a052f
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 18 deletions.
35 changes: 17 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift

name: CI

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

concurrency:
Expand All @@ -18,15 +13,19 @@ jobs:
runs-on: macos-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Select Xcode version
run: sudo xcode-select -s /Applications/Xcode_15.4.app
- name: Build and Tests
run: xcodebuild build -scheme HUDHero -sdk iphonesimulator17.5 -destination "OS=17.5,name=iPhone 15 Pro" -resultBundlePath HUDHero.xcresult test
- name: Display test results
uses: jobearrr/xcresulttool@v1
with:
path: HUDHero.xcresult
token: ${{ secrets.GITHUB_TOKEN }}
if: success() || failure()
- name: Checkout code
uses: actions/checkout@v4
- name: Select Xcode version
run: sudo xcode-select -s /Applications/Xcode_15.4.app
- name: Build & Tests
run: |
xcodebuild clean build test -scheme HUDHero \
-sdk iphonesimulator17.5 \
-destination "OS=17.5,name=iPhone 15 Pro" \
-resultBundlePath HUDHero.xcresult
- name: Display test results
uses: jobearrr/xcresulttool@v1
with:
path: HUDHero.xcresult
token: ${{ secrets.GITHUB_TOKEN }}
if: success() || failure()
40 changes: 40 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Main

on:
push:
branches: [main]
workflow_dispatch:

concurrency:
group: "Main"

jobs:
test-and-gather-test-coverage:
runs-on: macos-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Slather
run: sudo gem install slather
- name: Select Xcode version
run: sudo xcode-select -s /Applications/Xcode_15.4.app
- name: Build & Tests
run: |
xcodebuild clean build test \
-scheme HUDHero \
-sdk iphonesimulator17.5 \
-destination "OS=17.5,name=iPhone 15 Pro" \
ONLY_ACTIVE_ARCH=YES \
-resultBundlePath HUDHero.xcresult
-derivedDataPath /tmp/DerivedDataWithCoverageForiOS \
- name: Test & publish code coverage
uses: paambaati/codeclimate-action@v3.2.0
env:
CC_TEST_REPORTER_ID: "${{ secrets.CC_TEST_REPORTER_ID }}"
with:
debug: true
coverageCommand: |
slather coverage -x --scheme "HUDHero" --output-directory "slather_reports/HUDHero_iOS" -b "/tmp/DerivedDataWithCoverageForiOS"
coverageLocations: |
${{ github.workspace }}/slather_reports/HUDHero_iOS/cobertura.xml:cobertura

0 comments on commit 57a052f

Please sign in to comment.