Skip to content

[BITAU-190] Sync With Bitwarden App Should Go to App Store When Not Installed #410

[BITAU-190] Sync With Bitwarden App Should Go to App Store When Not Installed

[BITAU-190] Sync With Bitwarden App Should Go to App Store When Not Installed #410

Workflow file for this run

name: Test
on:
push:
branches:
- "main"
- "rc"
- "hotfix-rc"
pull_request_target:
types: [opened, synchronize]
env:
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer
MINT_LINK_PATH: .mint/bin
MINT_PATH: .mint/lib
SIMULATOR_DESTINATION: platform=iOS Simulator,name=iPhone 15 Pro,OS=17.0.1
RESULT_BUNDLE_PATH: build/AuthenticatorTests.xcresult
COVERAGE_PATH: build/coverage.xml
XCODE_VERSION: 15.4
jobs:
check-run:
name: Check PR run
uses: bitwarden/gh-actions/.github/workflows/check-run.yml@main
test:
name: Test
runs-on: macos-14-xlarge
needs: check-run
permissions:
contents: read
pull-requests: write
steps:
- name: Check out repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set Xcode version
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
with:
xcode-version: ${{ env.XCODE_VERSION }}
- name: Configure Ruby
uses: ruby/setup-ruby@7bae1d00b5db9166f4f0fc47985a3a5702cb58f0 # v1.197.0
with:
bundler-cache: true
- name: Cache Mint packages
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: .mint
key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}
restore-keys: |
${{ runner.os }}-mint-
- name: Cache SPM packages
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: build/DerivedData/SourcePackages
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Install yeetd
run: |
wget https://github.com/biscuitehh/yeetd/releases/download/1.0/yeetd-normal.pkg
sudo installer -pkg yeetd-normal.pkg -target /
yeetd &
- name: Install Mint, protobuf, xcbeautify, and xcresultparser
run: |
brew install mint swift-protobuf xcbeautify a7ex/homebrew-formulae/xcresultparser
./Scripts/bootstrap.sh
- name: Build and test
run: |
set -o pipefail && \
xcodebuild test \
-project Authenticator.xcodeproj \
-scheme Authenticator \
-configuration Debug \
-destination "${{ env.SIMULATOR_DESTINATION }}" \
-resultBundlePath ${{ env.RESULT_BUNDLE_PATH }} \
-derivedDataPath build/DerivedData \
-enableCodeCoverage YES \
| xcbeautify --renderer github-actions
- name: Convert coverage to Cobertura
run: |
set -o pipefail && \
xcresultparser --output-format cobertura \
"$RESULT_BUNDLE_PATH" >"$COVERAGE_PATH"
- name: Upload to codecov.io
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
plugin: xcode
file: ${{ env.COVERAGE_PATH }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}