Files
iOS/.github/workflows/ci.yml
dependabot[bot] 34a0ef0d10 GitHub Actions: Bump ruby/setup-ruby from 1.266.0 to 1.267.0 in the dependencies group (#3926)
Bumps the dependencies group with 1 update:
[ruby/setup-ruby](https://github.com/ruby/setup-ruby).

Updates `ruby/setup-ruby` from 1.266.0 to 1.267.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/ruby/setup-ruby/releases">ruby/setup-ruby's
releases</a>.</em></p>
<blockquote>
<h2>v1.267.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Scale bundler install jobs with CPU count up to 8 by <a
href="https://github.com/thomasbreland"><code>@​thomasbreland</code></a>
in <a
href="https://redirect.github.com/ruby/setup-ruby/pull/822">ruby/setup-ruby#822</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/thomasbreland"><code>@​thomasbreland</code></a>
made their first contribution in <a
href="https://redirect.github.com/ruby/setup-ruby/pull/822">ruby/setup-ruby#822</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/ruby/setup-ruby/compare/v1.266.0...v1.267.0">https://github.com/ruby/setup-ruby/compare/v1.266.0...v1.267.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d5126b9b35"><code>d5126b9</code></a>
exec.exec() only accepts strings</li>
<li><a
href="274049f8cf"><code>274049f</code></a>
Use os.availableParallelism() instead of os.cpus().length</li>
<li><a
href="a96ff531da"><code>a96ff53</code></a>
Scale bundler install jobs with CPU count up to 8</li>
<li>See full diff in <a
href="4ff6f3611a...d5126b9b35">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruby/setup-ruby&package-manager=github_actions&previous-version=1.266.0&new-version=1.267.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bruno Pantaleão Gonçalves <5808343+bgoncal@users.noreply.github.com>
2025-11-04 15:57:00 +01:00

196 lines
7.1 KiB
YAML

name: CI
on:
pull_request:
push:
branches:
- master
env:
DEVELOPER_DIR: /Applications/Xcode_26.0.app/Contents/Developer
FASTLANE_SKIP_UPDATE_CHECK: true
FASTLANE_XCODE_LIST_TIMEOUT: 80
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 80
HOMEBREW_NO_INSTALL_CLEANUP: TRUE
BUNDLE_PATH: vendor/bundle
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: ruby/setup-ruby@d5126b9b3579e429dd52e51e68624dda2e05be25 # v1.267.0
with:
ruby-version: "3.1"
bundler-cache: true
- name: YamlLint
run: yamllint --strict --format github .
- name: RuboCop
run: bundle exec rubocop --format github
- name: SwiftLint
run: |
docker run --rm -v `pwd`:`pwd` -w `pwd` \
ghcr.io/realm/swiftlint:0.54.0 \
swiftlint lint --strict --config .swiftlint.yml --reporter github-actions-logging
- name: SwiftFormat
run: |
docker run --rm -v `pwd`:`pwd` -w `pwd` \
ghcr.io/nicklockwood/swiftformat:0.53.1 \
--lint --config .swiftformat .
check-swiftlint-disables:
needs: lint
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Scan for `swiftlint:disable` in PR diff
id: scan
continue-on-error: false
run: |
git fetch origin master:refs/remotes/origin/master
DISABLE_LINES=$(git diff origin/master -- '*.swift' | grep -E '^\+.*// swiftlint:disable' || true)
echo "disable_lines<<EOF" >> $GITHUB_OUTPUT
echo "$DISABLE_LINES" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Comment on PR if `swiftlint:disable` is found
if: steps.scan.outputs.disable_lines != ''
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4
with:
header: swiftlint-disable-check
message: |
⚠️ **SwiftLint disabled in this PR**
The following added lines contain `// swiftlint:disable`. Please verify this is necessary.
test:
needs: check-swiftlint-disables
runs-on: macos-15
timeout-minutes: 40
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
name: "Cache: Pods"
id: cache_pods
with:
path: |
Pods
Tools/MaterialDesignIcons.ttf
Tools/MaterialDesignIcons.json
key: >-
${{ runner.os }}-pods-${{ env.DEVELOPER_DIR }}-
${{ hashFiles('**/Gemfile.lock', '**/Podfile.lock', 'Tools/BuildMaterialDesignIconsFont.sh') }}
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
name: "Cache: Gems"
id: cache_gems
with:
path: vendor/bundle
key: >-
${{ runner.os }}-gems-${{ env.ImageVersion }}-${{ env.DEVELOPER_DIR }}-${{ hashFiles('**/Gemfile.lock') }}
- name: Install Brews
# right now, we don't need anything from brew for tests, so save some time
if: ${{ false }}
run: brew bundle
- name: Install Gems
if: steps.cache_gems.outputs.cache-hit != 'true'
run: bundle install --jobs 4 --retry 3
- name: Install Pods Release
if: steps.cache_pods.outputs.cache-hit != 'true'
run: bundle exec pod install --repo-update
- name: Run tests
run: bundle exec fastlane test
- uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
name: "Upload Code Coverage"
with:
xcode: true
xcode_archive_path: fastlane/test_output/Tests-Unit.xcresult
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
name: "Upload Test Logs"
if: ${{ always() }}
with:
name: test-logs
path: |
~/Library/Logs/DiagnosticReports
~/Library/Developer/Xcode/DerivedData/HomeAssistant-*/Logs/Test
~/Library/Logs/scan
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
name: "Upload Simulator App"
with:
name: ios-simulator
path: ~/Library/Developer/Xcode/DerivedData/HomeAssistant-*/Build/Products/Debug-iphonesimulator/*.app
size:
needs: check-swiftlint-disables
if: |
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == 'home-assistant/iOS'
runs-on: macos-15
timeout-minutes: 60
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.6.2
name: "Cache: Pods"
id: cache_pods
with:
path: |
Pods
Tools/MaterialDesignIcons.ttf
Tools/MaterialDesignIcons.json
key: >-
${{ runner.os }}-pods-${{ env.DEVELOPER_DIR }}-
${{ hashFiles('**/Gemfile.lock', '**/Podfile.lock', 'Tools/BuildMaterialDesignIconsFont.sh') }}
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
name: "Cache: Gems"
id: cache_gems
with:
path: vendor/bundle
key: >-
${{ runner.os }}-gems-${{ env.ImageVersion }}-${{ env.DEVELOPER_DIR }}-${{ hashFiles('**/Gemfile.lock') }}
- name: Install Brews
# right now, we don't need anything from brew for sizing, so save some time
if: ${{ false }}
run: brew bundle
- name: Install Gems
if: steps.cache_gems.outputs.cache-hit != 'true'
run: bundle install --jobs 4 --retry 3
- name: Install Pods Release
if: steps.cache_pods.outputs.cache-hit != 'true'
run: bundle exec pod install --repo-update
- name: Build app
run: bundle exec fastlane ios size
env:
P12_KEY_DISTRIBUTION: ${{ secrets.P12_KEY_DISTRIBUTION }}
P12_VALUE_DISTRIBUTION: ${{ secrets.P12_VALUE_DISTRIBUTION }}
P12_KEY_MAC_DEVELOPER_ID: ${{ secrets.P12_KEY_MAC_DEVELOPER_ID }}
P12_KEY_MAC_DEVELOPER_INSTALLER: ${{ secrets.P12_KEY_MAC_DEVELOPER_INSTALLER }}
P12_VALUE_MAC_DEVELOPER_ID: ${{ secrets.P12_VALUE_MAC_DEVELOPER_ID }}
P12_VALUE_MAC_DEVELOPER_INSTALLER: ${{ secrets.P12_VALUE_MAC_DEVELOPER_INSTALLER }}
EMERGE_API_TOKEN: ${{ secrets.EMERGE_API_TOKEN }}
EMERGE_REPO_NAME: ${{ github.repository }}
EMERGE_PR_NUMBER: ${{ github.event.number }}
EMERGE_SHA: ${{ github.event.pull_request.head.sha }}
EMERGE_BASE_SHA: ${{ github.event.pull_request.base.sha }}
HOMEASSISTANT_APP_STORE_CONNECT_PASSWORD: ${{ secrets.HOMEASSISTANT_APP_STORE_CONNECT_PASSWORD }}
HOMEASSISTANT_APPLE_ID: ${{ secrets.HOMEASSISTANT_APPLE_ID }}
HOMEASSISTANT_FASTLANE_SESSION: ${{ secrets.HOMEASSISTANT_FASTLANE_SESSION }}