Merge tag '1.9.1' into develop #619
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: Build | |
on: | |
[push] | |
jobs: | |
build: | |
name: Build and test | |
runs-on: macos-14 | |
env: | |
DERIVED_DATA_PATH: 'DerivedData' | |
DEVICE: 'iPhone 15 Pro' | |
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: .build | |
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} | |
restore-keys: | | |
${{ runner.os }}-spm- | |
- name: Install SwiftLint | |
run: brew install swiftlint | |
- name: Run process.sh script | |
run: | | |
./Scripts/process.sh | |
exit $? | |
- name: Select Xcode 15.2 | |
run: sudo xcode-select -s /Applications/Xcode_15.2.app | |
- name: Build | |
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild clean build-for-testing -scheme 'CryptomatorCloudAccess' -destination "name=$DEVICE" -derivedDataPath $DERIVED_DATA_PATH -enableCodeCoverage YES | 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 | |
run: | | |
gem install slather | |
slather coverage -x --build-directory $DERIVED_DATA_PATH --ignore "$DERIVED_DATA_PATH/SourcePackages/*" --scheme CryptomatorCloudAccess CryptomatorCloudAccess.xcodeproj | |
bash <(curl -Ls https://coverage.codacy.com/get.sh) | |
env: | |
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
continue-on-error: true | |
- name: Run integration tests | |
if: startsWith(github.ref, 'refs/tags/') | |
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme 'CryptomatorCloudAccessIntegrationTests' -destination "name=$DEVICE" -derivedDataPath $DERIVED_DATA_PATH test | xcpretty | |
env: | |
DROPBOX_ACCESS_TOKEN: ${{ secrets.DROPBOX_ACCESS_TOKEN }} | |
GOOGLE_DRIVE_CLIENT_ID: ${{ secrets.GOOGLE_DRIVE_CLIENT_ID }} | |
GOOGLE_DRIVE_REFRESH_TOKEN: ${{ secrets.GOOGLE_DRIVE_REFRESH_TOKEN }} | |
ONEDRIVE_CLIENT_ID: ${{ secrets.ONEDRIVE_CLIENT_ID }} | |
ONEDRIVE_REDIRECT_URI_SCHEME: ${{ secrets.ONEDRIVE_REDIRECT_URI_SCHEME }} | |
ONEDRIVE_REFRESH_TOKEN: ${{ secrets.ONEDRIVE_REFRESH_TOKEN }} | |
PCLOUD_APP_KEY: ${{ secrets.PCLOUD_APP_KEY }} | |
PCLOUD_ACCESS_TOKEN: ${{ secrets.PCLOUD_ACCESS_TOKEN }} | |
PCLOUD_HTTP_API_HOST_NAME: ${{ secrets.PCLOUD_HTTP_API_HOST_NAME }} | |
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }} | |
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }} | |
S3_URL: ${{ secrets.S3_URL }} | |
S3_BUCKET: ${{ secrets.S3_BUCKET }} | |
S3_REGION: ${{ secrets.S3_REGION }} | |
WEBDAV_BASE_URL: ${{ secrets.WEBDAV_BASE_URL }} | |
WEBDAV_USERNAME: ${{ secrets.WEBDAV_USERNAME }} | |
WEBDAV_PASSWORD: ${{ secrets.WEBDAV_PASSWORD }} | |
release: | |
name: Deploy and draft a release | |
runs-on: macos-14 | |
needs: build | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Draft release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
body: | | |
:construction: Work in Progress | |
draft: true | |
prerelease: false |