Update actions/cache action to v4 #2202
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: Test | |
on: | |
pull_request: | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_15.0.1.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 | |
jobs: | |
test: | |
name: Test | |
runs-on: macos-13-xlarge | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@b203567269b5bbc256dbc1c84f7495913f977353 # v1.167.0 | |
with: | |
bundler-cache: true | |
ruby-version: 3.2.2 | |
- name: Cache Mint Packages | |
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
path: .mint | |
key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }} | |
restore-keys: | | |
${{ runner.os }}-mint- | |
- name: Cache SPM Packages | |
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.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: Setup | |
run: | | |
brew install mint xcbeautify | |
./Scripts/bootstrap.sh | |
- name: Build and Test | |
run: | | |
set -o pipefail && \ | |
xcodebuild test \ | |
-project Bitwarden.xcodeproj \ | |
-scheme Bitwarden \ | |
-configuration Debug \ | |
-destination "${{ env.SIMULATOR_DESTINATION }}" \ | |
-resultBundlePath build/BitwardenTests.xcresult \ | |
-derivedDataPath build/DerivedData \ | |
| xcbeautify --renderer github-actions | |
- name: Danger | |
env: | |
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: bundle exec danger |