Fix dav URL for cases where user ID does not match username #88
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
# This workflow will build a Swift project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift | |
name: Xcodebuild build and test | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: List Xcode installations | |
run: sudo ls -1 /Applications | grep "Xcode" | |
- name: Select Xcode 15.3 | |
run: sudo xcode-select -s /Applications/Xcode_15.3.app/Contents/Developer | |
- name: Build and test | |
run: xcodebuild clean build test -scheme NextcloudFileProviderKit -destination "platform=macOS,name=Any Mac" -enableCodeCoverage YES -derivedDataPath NKFPK/.derivedData | |
- name: Gather code coverage | |
run: | | |
cd NKFPK/.derivedData/Build/ProfileData | |
cd $(ls -d */|head -n 1) | |
directory=${PWD##*/} | |
pathCoverage=NKFPK/.derivedData/Build/ProfileData/${directory}/Coverage.profdata | |
cd ../../../../../ | |
xcrun llvm-cov export -format="lcov" -instr-profile $pathCoverage NKFPK/.derivedData/Build/Products/Debug/NextcloudFileProviderKitTests.xctest/Contents/MacOS/NextcloudFileProviderKitTests > coverage_report.lcov | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: fail | |
files: ./coverage_report.lcov | |
verbose: true |