Bump codecov/codecov-action from 3 to 5 #557
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: Unit tests | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
verify: | |
runs-on: macos-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Ruby 2.7 | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '2.7' | |
- name: Restore cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
vendor | |
Branch-TestBed/Pods | |
key: ${{ runner.os }}-${{ hashFiles('Gemfile.lock','Branch-TestBed/Podfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- name: Install Ruby dependencies | |
run: | | |
bundle config set --local path vendor | |
bundle check || bundle install | |
# This happens automatically with the unit_tests lane, but adding it here | |
# makes it easier to keep track of installation time via GHA without | |
# adding execution time to the next step. | |
#- name: Install CocoaPods dependencies | |
# run: bundle exec fastlane prepare_pods | |
- name: Run unit tests | |
run: bundle exec fastlane unit_tests | |
- name: Upload test results | |
uses: actions/upload-artifact@v3 | |
if: always() # even if tests fail | |
with: | |
name: test-results | |
path: fastlane/test_output | |
- name: Upload codecov results | |
uses: codecov/codecov-action@v5 | |
with: | |
files: ./fastlane/test_output/cobertura.xml |