Merge pull request #107 from SDWebImage/bugfix/podspec #65
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: "SDWebImageWebPCoder CI" | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- '*' | |
permissions: | |
contents: read | |
jobs: | |
Pods: | |
name: Cocoapods Lint | |
runs-on: macos-11 | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Cocoapods | |
run: gem install cocoapods --no-document --quiet | |
- name: Install Xcpretty | |
run: gem install xcpretty --no-document --quiet | |
- name: Pod Update. | |
run: pod repo update --silent | |
- name: Pod Install. | |
run: pod install | |
- name: Run SDWebImageWebPCoder podspec lint | |
run: | | |
set -o pipefail | |
pod lib lint SDWebImageWebPCoder.podspec --allow-warnings --skip-tests | |
Test: | |
name: Unit Test | |
runs-on: macos-11 | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app | |
WORKSPACE_NAME: SDWebImageWebPCoder.xcworkspace | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
strategy: | |
matrix: | |
iosDestination: ["platform=iOS Simulator,name=iPhone 13 Pro"] | |
macOSDestination: ["platform=macOS,arch=x86_64"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Cocoapods | |
run: gem install cocoapods --no-document --quiet | |
- name: Install Xcpretty | |
run: gem install xcpretty --no-document --quiet | |
- name: Pod Update | |
run: pod repo update --silent | |
- name: Pod Install | |
run: pod install | |
- name: Clean DerivedData | |
run: | | |
rm -rf ~/Library/Developer/Xcode/DerivedData/ | |
mkdir DerivedData | |
- name: Test - ${{ matrix.iosDestination }} | |
run: | | |
set -o pipefail | |
xcodebuild test -workspace "${{ env.WORKSPACE_NAME }}" -scheme "SDWebImageWebPCoderTests" -destination "${{ matrix.iosDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | |
mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/iOS | |
- name: Test - ${{ matrix.macOSDestination }} | |
run: | | |
set -o pipefail | |
xcodebuild test -workspace "${{ env.WORKSPACE_NAME }}" -scheme "SDWebImageWebPCoderTests-macOS" -destination "${{ matrix.macOSDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | |
mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/macOS | |
- name: Code Coverage | |
run: | | |
set -o pipefail | |
export PATH="/usr/local/opt/curl/bin:$PATH" | |
curl --version | |
bash <(curl -s https://codecov.io/bash) -v -D './DerivedData/iOS' -J '^SDWebImageWebPCoder$' -c -X gcov -F ios | |
bash <(curl -s https://codecov.io/bash) -v -D './DerivedData/macOS' -J '^SDWebImageWebPCoder$' -c -X gcov -F macos | |