Skip to content

Remove option to report error in github and add option to copy error to clipboard #4475

Remove option to report error in github and add option to copy error to clipboard

Remove option to report error in github and add option to copy error to clipboard #4475

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- master
env:
DEVELOPER_DIR: /Applications/Xcode_16.2.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@v4
- uses: ruby/setup-ruby@v1
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 .
test:
runs-on: macos-15
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
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@v4
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/[email protected]
name: "Upload Code Coverage"
with:
xcode: true
xcode_archive_path: fastlane/test_output/Tests-Unit.xcresult
- uses: actions/upload-artifact@v4
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@v4
name: "Upload Simulator App"
with:
name: ios-simulator
path: ~/Library/Developer/Xcode/DerivedData/HomeAssistant-*/Build/Products/Debug-iphonesimulator/*.app
size:
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@v4
- uses: actions/cache@v4
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@v4
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_IOS_APP_STORE: ${{ secrets.P12_KEY_IOS_APP_STORE }}
P12_KEY_MAC_APP_STORE: ${{ secrets.P12_KEY_MAC_APP_STORE }}
P12_KEY_MAC_DEVELOPER_ID: ${{ secrets.P12_KEY_MAC_DEVELOPER_ID }}
P12_VALUE_IOS_APP_STORE: ${{ secrets.P12_VALUE_IOS_APP_STORE }}
P12_VALUE_MAC_APP_STORE: ${{ secrets.P12_VALUE_MAC_APP_STORE }}
P12_VALUE_MAC_DEVELOPER_ID: ${{ secrets.P12_VALUE_MAC_DEVELOPER_ID }}
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 }}