Skip to content

fixed build codecov ci reports #441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
# Check for updates to GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
82 changes: 67 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ on:

jobs:
danger:
name: Danger
runs-on: macos-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 2.7.8
ruby-version: 3.2

- uses: MeilCli/danger-action@v5
with:
Expand All @@ -30,22 +31,37 @@ jobs:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

test:
runs-on: macos-14
name: Tests on ${{ matrix.device }} ${{ matrix.os }}
runs-on: macos-latest

strategy:
fail-fast: false
matrix:
platform:
- platform=iOS Simulator,name=iPhone 16 Pro Max
- platform=iOS Simulator,name=iPhone 16 Pro
- platform=iOS Simulator,name=iPhone 16
- platform=iOS Simulator,name=iPhone 16 Plus
- platform=iOS Simulator,name=iPhone SE (3rd generation)
- platform=tvOS Simulator,name=Apple TV
- platform=tvOS Simulator,name=Apple TV 4K (3rd generation)
- platform=watchOS Simulator,name=Apple Watch Series 10 (46mm)
include:
- platform: iOS Simulator
device: iPhone 16 Pro Max
os: 18.2
- platform: iOS Simulator
device: iPhone 16 Pro
os: 18.2
- platform: iOS Simulator
device: iPhone 16
os: 18.2
- platform: iOS Simulator
device: iPhone SE (3rd generation)
os: 18.2
- platform: tvOS Simulator
device: Apple TV
os: 18.2
- platform: tvOS Simulator
device: Apple TV 4K (3rd generation)
os: 18.2
- platform: watchOS Simulator
device: Apple Watch Series 10 (46mm)
os: 11.2

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: maxim-lobanov/setup-xcode@v1
with:
Expand All @@ -54,7 +70,43 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 2.7.8
ruby-version: 3.2

- name: Install Project Gems
run: bundle install

- name: xcodebuild
run: set -o pipefail && xcodebuild -scheme DeviceKit -destination "${{ matrix.platform }}" -configuration Debug ONLY_ACTIVE_ARCH=YES -enableCodeCoverage YES test
run: set -o pipefail && xcodebuild -scheme DeviceKit -destination "platform=${{ matrix.platform }},name=${{ matrix.device }},OS=${{ matrix.os }}" -configuration Debug ONLY_ACTIVE_ARCH=YES -enableCodeCoverage YES -derivedDataPath ./DerivedData -resultBundlePath ./TestResults.xcresult test

- name: Install xcresultparser
run: brew install xcresultparser

- name: Generate Coverage Report (Slather)
run: |
bundle exec slather coverage \
--scheme DeviceKit \
--output-directory ./coverage \
--cobertura-xml \
--build-directory ./DerivedData \
"./DeviceKit.xcodeproj"

- name: Convert Test Results to JUnit
run: |
xcresultparser \
--output-format junit \
./TestResults.xcresult > ./test-results.xml

- name: Upload Code Coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
files: ./coverage/cobertura.xml

- name: Upload Test Results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
files: ./test-results.xml
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
source 'https://rubygems.org'

gem 'bundler'
gem 'xcpretty'
gem 'cocoapods', '1.15.2'
gem 'danger'
gem 'danger-swiftlint'
gem 'slather'
144 changes: 77 additions & 67 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,33 @@ GEM
base64
nkf
rexml
activesupport (7.1.3.2)
activesupport (7.2.2.1)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
base64 (0.2.0)
bigdecimal (3.1.7)
claide (1.0.3)
benchmark (0.4.0)
bigdecimal (3.1.9)
claide (1.1.0)
claide-plugins (0.9.2)
cork
nap
open4 (~> 1.3)
clamp (1.3.2)
cocoapods (1.15.2)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
Expand Down Expand Up @@ -66,113 +70,119 @@ GEM
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
concurrent-ruby (1.3.5)
connection_pool (2.5.0)
cork (0.3.0)
colored2 (~> 3.1)
danger (8.3.1)
danger (9.5.1)
base64 (~> 0.2)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored2 (~> 3.1)
cork (~> 0.1)
faraday (>= 0.9.0, < 2.0)
faraday (>= 0.9.0, < 3.0)
faraday-http-cache (~> 2.0)
git (~> 1.7)
git (~> 1.13)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.0)
no_proxy_fix
octokit (~> 4.7)
octokit (>= 4.0)
pstore (~> 0.1)
terminal-table (>= 1, < 4)
danger-swiftlint (0.26.0)
danger-swiftlint (0.37.1)
danger
rake (> 10)
thor (~> 0.19)
thor (~> 1.0.0)
drb (2.2.1)
escape (0.0.4)
ethon (0.16.0)
ffi (>= 1.15.0)
faraday (1.5.1)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0.1)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
faraday-patron (~> 1.0)
multipart-post (>= 1.2, < 3)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-http-cache (2.2.0)
faraday (2.13.0)
faraday-net_http (>= 2.0, < 3.5)
json
logger
faraday-http-cache (2.5.1)
faraday (>= 0.8)
faraday-httpclient (1.0.1)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
ffi (1.16.3)
faraday-net_http (3.4.0)
net-http (>= 0.5.0)
ffi (1.17.2-arm64-darwin)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
git (1.9.1)
git (1.19.1)
addressable (~> 2.8)
rchardet (~> 1.8)
httpclient (2.8.3)
i18n (1.14.4)
httpclient (2.9.0)
mutex_m
i18n (1.14.7)
concurrent-ruby (~> 1.0)
json (2.7.2)
kramdown (2.3.1)
rexml
json (2.10.2)
kramdown (2.5.1)
rexml (>= 3.3.9)
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
minitest (5.22.3)
logger (1.7.0)
minitest (5.25.5)
molinillo (0.8.0)
multipart-post (2.1.1)
mutex_m (0.2.0)
nanaimo (0.3.0)
mutex_m (0.3.0)
nanaimo (0.4.0)
nap (1.1.0)
net-http (0.6.0)
uri
netrc (0.11.0)
nkf (0.2.0)
no_proxy_fix (0.1.2)
octokit (4.21.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
nokogiri (1.18.7-arm64-darwin)
racc (~> 1.4)
octokit (9.2.0)
faraday (>= 1, < 3)
sawyer (~> 0.9)
open4 (1.3.4)
public_suffix (4.0.6)
rake (13.0.6)
rchardet (1.8.0)
rexml (3.2.5)
rouge (2.0.7)
pstore (0.2.0)
public_suffix (4.0.7)
racc (1.8.1)
rake (13.2.1)
rchardet (1.9.0)
rexml (3.4.1)
rouge (3.28.0)
ruby-macho (2.5.1)
ruby2_keywords (0.0.4)
sawyer (0.8.2)
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
terminal-table (3.0.1)
faraday (>= 0.17.3, < 3)
securerandom (0.4.1)
slather (2.8.5)
CFPropertyList (>= 2.2, < 4)
activesupport
clamp (~> 1.3)
nokogiri (>= 1.14.3)
xcodeproj (~> 1.27)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
thor (0.20.3)
thor (1.0.1)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.0.0)
xcodeproj (1.24.0)
unicode-display_width (2.6.0)
uri (1.0.3)
xcodeproj (1.27.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
xcpretty (0.3.0)
rouge (~> 2.0.7)
nanaimo (~> 0.4.0)
rexml (>= 3.3.6, < 4.0)
xcpretty (0.4.1)
rouge (~> 3.28.0)

PLATFORMS
ruby

DEPENDENCIES
bundler
cocoapods (= 1.15.2)
danger
danger-swiftlint
slather
xcpretty

BUNDLED WITH
2.1.4
2.6.8