diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b396194..e3e6adb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -167,12 +167,13 @@ jobs: # - name: Clean up previous code coverage report # run: bundle exec fastlane cleanUpOutput - - name: \[Workaround\] Running Danger SwiftFormat from non-root directory + - name: __Workaround__ Running Danger SwiftFormat from non-root directory run: | - gem which danger - gem which danger-swiftformat + # Find the path of danger_swiftformat + danger_swiftformat_path=$(echo "$(gem which danger_swiftformat)" | sed 's/\/danger_swiftformat.rb//') + echo $danger_swiftformat_path # Insert a map operator in the "find_swift_files" method to remove "sample/ios/" prefix from all files. - sed -i '' "s/.uniq/.uniq.map { |file| file.partition('sample\/ios\/').last }/g" '/Users/luongvo/.rvm/gems/ruby-3.0.0/gems/danger-swiftformat-0.8.1/lib/swiftformat/plugin.rb' + sed -i '' "s/.uniq/.uniq.map { |file| file.partition('sample\/ios\/').last }/g" "$danger_swiftformat_path/swiftformat/plugin.rb" - name: Run Danger to wrap up the review env: