Skip to content

Improve tests and workflows #6

Improve tests and workflows

Improve tests and workflows #6

Workflow file for this run

name: Unit Tests
on:
workflow_dispatch:
pull_request:
branches: [develop]
# Limit only the latest workflow created to run
concurrency:
group: build
cancel-in-progress: true
jobs:
build:
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Swift Packages
id: cache-spm
uses: actions/cache@v3
env:
cache-name: cache-swift-packages
with:
path: ./.build
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./Package.resolved') }}
- name: Cache Ruby Packages
id: cache-ruby
uses: actions/cache@v3
env:
cache-name: cache-ruby-packages
with:
path: ./vendor
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./Gemfile.lock') }}
- name: Cache Homebrew Packages
id: cache-homebrew
uses: actions/cache@v3
env:
cache-name: cache-homebrew-packages
with:
path: /opt/homebrew/Cellar
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./Brewfile.lock.json') }}
- name: Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Install Gem Dependencies
if: ${{ steps.cache-ruby.outputs.cache-hit != 'true' }}
run: bundle install --path vendor/bundle
- name: Install Homebrew Dependencies/
if: ${{ steps.cache-homebrew.outputs.cache-hit != 'true' }}
run: brew bundle
- name: List Homebrew directory
run: brew --prefix swiftformat
- name: Run Unit Tests
run: bundle exec fastlane ios unit_tests