Skip to content

Commit

Permalink
add custom csript
Browse files Browse the repository at this point in the history
  • Loading branch information
NVMakarenko committed Dec 1, 2024
1 parent 4950070 commit 642f370
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ jobs:
- name: Unlighthouse Assertions and Client
run: unlighthouse-ci --site http://51.44.25.104/en --build-static --output-path .unlighthouse/dist

- name: Make convert_json_to_csv executable
run: chmod +x bin/convert_json_to_csv.rb

- name: Convert JSON to CSV
run: ruby lib/convert_json_to_csv.rb .unlighthouse/dist/ci-result.json .unlighthouse/dist/ci-result.csv
run: bin/convert_json_to_csv.rb .unlighthouse/dist/ci-result.json .unlighthouse/dist/ci-result.csv

- name: Upload Unlighthouse Report
uses: actions/upload-artifact@v4
Expand Down
6 changes: 0 additions & 6 deletions app/lib/convert_json_to_csv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,3 @@ def self.perform(input_file, output_file)
end
end
end

if __FILE__ == $0
input_file = ARGV[0]
output_file = ARGV[1]
ConvertJsonToCsv.perform(input_file, output_file)
end
6 changes: 6 additions & 0 deletions bin/convert_json_to_csv.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env ruby
require_relative "../lib/convert_json_to_csv"

input_file = ARGV[0]
output_file = ARGV[1]
ConvertJsonToCsv.perform(input_file, output_file)

0 comments on commit 642f370

Please sign in to comment.