46 lines
1.4 KiB
YAML
46 lines
1.4 KiB
YAML
name: Testing
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
testing:
|
|
runs-on: macos-13
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: '2.7'
|
|
bundler-cache: true
|
|
- name: Installing packages
|
|
run: |
|
|
brew update
|
|
brew install carthage
|
|
brew install go || brew link --overwrite go
|
|
gem install bundler
|
|
- uses: actions/cache@v3
|
|
id: carthage-cache
|
|
with:
|
|
path: Carthage
|
|
key: ${{ runner.os }}-carthage-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/Cartfile.resolved') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-carthage-${{ secrets.CACHE_VERSION }}-
|
|
- uses: actions/cache@v3
|
|
id: gopenpgp-cache
|
|
with:
|
|
path: go
|
|
key: ${{ runner.os }}-gopenpgp-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/gopenpgp_build.sh') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gopenpgp-${{ secrets.CACHE_VERSION }}-
|
|
- name: Bundle Install
|
|
run: |
|
|
bundle config path vendor/bundle
|
|
bundle install --jobs 4 --retry 3
|
|
- name: Carthage
|
|
if: ${{ steps.carthage-cache.outputs.cache-hit == false }}
|
|
run: |
|
|
carthage bootstrap --no-use-binaries --cache-builds --use-xcframeworks
|
|
- name: GopenPGP
|
|
if: ${{ steps.gopenpgp-cache.outputs.cache-hit == false }}
|
|
run: ./scripts/gopenpgp_build.sh
|
|
- name: Testing
|
|
run: bundle exec fastlane test
|