Skip to content

Fix tests

Fix tests #252

Workflow file for this run

name: CI Build
# Run for any commits to any branch
on:
pull_request:
push:
branches:
- main
env:
LANG: en_US.UTF-8
# CodeClimate
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
# Notifications
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_URL }}
jobs:
test-suite-and-report:
runs-on: macos-latest
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Bundler
run: bundle install --jobs 4 --retry 3
- name: Setup Code Climate test reporter
run: |
pwd
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-darwin-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- name: Run Test suite
run: |
xcodebuild test -project ios-base.xcodeproj -scheme ios-base-develop -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14,OS=16.2' -enableCodeCoverage YES -derivedDataPath DerivedData
- name: Slather Coverage
run: bundle exec slather
- name: Report coverate to Code Climate
run: ./cc-test-reporter after-build
- name: Send notification of build result
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
text: 'ios-base build status is ${{ job.status }}'
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
if: always()