2023-03-16 21:23:11 +08:00
|
|
|
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
|
2023-06-14 17:23:29 +08:00
|
|
|
xcodebuild test -workspace "${{ env.WORKSPACE_NAME }}" -scheme "SDWebImageWebPCoderTests" -destination "${{ matrix.iosDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO
|
2023-03-16 21:23:11 +08:00
|
|
|
mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/iOS
|
2023-11-08 18:59:59 +08:00
|
|
|
|
|
|
|
- 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
|
2023-03-16 21:23:11 +08:00
|
|
|
|
|
|
|
- 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
|
2023-11-08 18:59:59 +08:00
|
|
|
bash <(curl -s https://codecov.io/bash) -v -D './DerivedData/macOS' -J '^SDWebImageWebPCoder$' -c -X gcov -F macos
|
2023-03-16 21:23:11 +08:00
|
|
|
|