Skip to content

Commit

Permalink
Merge pull request #325 from cryptomator/ci-build-test-premium
Browse files Browse the repository at this point in the history
Run build & test also for Premium configuration
  • Loading branch information
tobihagemann authored Oct 17, 2023
2 parents 447831a + 4662163 commit 0633c48
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
DERIVED_DATA_PATH: 'DerivedData'
DEVICE: 'iPhone 12 Pro'
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
config: ['freemium', 'premium']
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
Expand All @@ -27,11 +30,20 @@ jobs:
run: |
cd fastlane
./scripts/create-cloud-access-secrets.sh
- name: Configuration for freemium
if: ${{ matrix.config == 'freemium' }}
run: |
echo "BUILD_CMD=-enableCodeCoverage YES" >> $GITHUB_ENV
- name: Configuration for premium
if: ${{ matrix.config == 'premium' }}
run: |
echo "BUILD_CMD=SWIFT_ACTIVE_COMPILATION_CONDITIONS='\$(inherited) ALWAYS_PREMIUM'" >> $GITHUB_ENV
- name: Build
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild clean build-for-testing -scheme 'AllTests' -destination "name=$DEVICE" -derivedDataPath $DERIVED_DATA_PATH -enableCodeCoverage YES | xcpretty
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild clean build-for-testing -scheme 'AllTests' -destination "name=$DEVICE" -derivedDataPath $DERIVED_DATA_PATH ${{ env.BUILD_CMD }} | xcpretty
- name: Test
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -xctestrun $(find . -type f -name "*.xctestrun") -destination "name=$DEVICE" -derivedDataPath $DERIVED_DATA_PATH | xcpretty
- name: Upload code coverage report
if: ${{ matrix.config == 'freemium' }}
run: |
gem install slather
slather coverage -x --build-directory $DERIVED_DATA_PATH --ignore "$DERIVED_DATA_PATH/SourcePackages/*" --scheme AllTests Cryptomator.xcodeproj
Expand Down

0 comments on commit 0633c48

Please sign in to comment.