Skip to content
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

Fix Github Actions Chceckout #3823

Merged
merged 4 commits into from
Jan 30, 2025
Merged
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
3 changes: 1 addition & 2 deletions .github/DangerFiles/Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
source("https://rubygems.org")

gem 'danger'
gem 'plist'
gem 'danger-xcode_summary'
gem 'plist'
37 changes: 15 additions & 22 deletions .github/DangerFiles/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,57 +26,50 @@ GEM
octokit (>= 4.0)
pstore (~> 0.1)
terminal-table (>= 1, < 4)
danger-plugin-api (1.0.0)
danger (> 2.0)
danger-xcode_summary (1.3.1)
danger-plugin-api (~> 1.0)
xcresult (~> 0.2.2)
faraday (2.12.0)
faraday-net_http (>= 2.0, < 3.4)
faraday (2.12.2)
faraday-net_http (>= 2.0, < 3.5)
json
logger
faraday-http-cache (2.5.1)
faraday (>= 0.8)
faraday-net_http (3.3.0)
net-http
faraday-net_http (3.4.0)
net-http (>= 0.5.0)
git (1.19.1)
addressable (~> 2.8)
rchardet (~> 1.8)
json (2.7.5)
kramdown (2.4.0)
rexml
json (2.9.1)
kramdown (2.5.1)
rexml (>= 3.3.9)
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
logger (1.6.1)
logger (1.6.5)
nap (1.1.0)
net-http (0.4.1)
net-http (0.6.0)
uri
octokit (9.2.0)
faraday (>= 1, < 3)
sawyer (~> 0.9)
open4 (1.3.4)
plist (3.7.1)
pstore (0.1.3)
plist (3.7.2)
pstore (0.1.4)
public_suffix (6.0.1)
rchardet (1.8.0)
rexml (3.3.9)
rchardet (1.9.0)
rexml (3.4.0)
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.6.0)
uri (0.13.1)
xcresult (0.2.2)
uri (1.0.2)

PLATFORMS
arm64-darwin-23
ruby

DEPENDENCIES
danger
danger-xcode_summary
plist

BUNDLED WITH
2.5.22
2.5.22
10 changes: 0 additions & 10 deletions .github/DangerFiles/TestResults.rb

This file was deleted.

16 changes: 10 additions & 6 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
# We need a sufficient depth or Danger will occasionally run into issues checking which files were modified.
fetch-depth: 100
# This is dangerous without the member check
ref: ${{ github.head_ref }}
ref: ${{ github.event.pull_request.head.sha }}
- name: Install Dependencies
run: |
npm install [email protected]
Expand All @@ -52,10 +52,12 @@ jobs:
- name: Report Static Analysis
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bundle exec danger --dangerfile=StaticAnalysis.rb --danger_id=StaticAnalysis
run: bundle exec danger --dangerfile=.github/DanagerFiles/StaticAnalysis.rb --danger_id=StaticAnalysis

test-orchestrator:
runs-on: macos-15
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/.github/DangerFiles/Gemfile
outputs:
libs: ${{ steps.test-orchestrator.outputs.libs }}
steps:
Expand Down Expand Up @@ -84,14 +86,15 @@ jobs:
fetch-depth: 100
# This is dangerous without the member check
ref: ${{ github.event.pull_request.head.sha }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- name: Determine Tests to Run
id: test-orchestrator
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd .github/DangerFiles
bundle update && bundle install
bundle exec danger --dangerfile=TestOrchestrator.rb
run: bundle exec danger --dangerfile=.github/DangerFiles/TestOrchestrator.rb --danger_id="TestOrchestrator"

ios-pr:
needs: [test-orchestrator]
Expand All @@ -102,4 +105,5 @@ jobs:
uses: ./.github/workflows/reusable-workflow.yaml
with:
lib: ${{ matrix.lib }}
is_pr: true
secrets: inherit
24 changes: 11 additions & 13 deletions .github/workflows/reusable-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,21 @@ on:
default: macos-15
required: false
type: string
is_pr:
type: boolean
default: false

jobs:
test-ios:
runs-on: ${{ inputs.macos }}
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/.github/DangerFiles/Gemfile
steps:
- uses: actions/checkout@v4
# We need a sufficient depth or Danger will occasionally run into issues
# checking which files were modified.
if: ${{ inputs.is_pr }}
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/checkout@v4
if: ${{ ! inputs.is_pr }}
with:
fetch-depth: 100
ref: ${{ github.head_ref }}
- name: Install Dependencies
env:
Expand All @@ -46,15 +49,10 @@ jobs:
code-coverage: true
upload-logs: always
verbosity: xcbeautify
- uses: ruby/setup-ruby@v1
- uses: slidoapp/[email protected]
with:
ruby-version: '3.3'
bundler-cache: true
- name: Danger Test Results
if: (github.event_name == 'pull_request') && failure()
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bundle exec danger --dangerfile=TestResults.rb --danger_id=${{ inputs.lib }}
path: test.xcresult
if: success() || failure()
- uses: codecov/codecov-action@v4
with:
flags: ${{ inputs.lib }}
Expand Down
Loading