-
Notifications
You must be signed in to change notification settings - Fork 11
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
add unlighthouse scan after staging #996
base: develop
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #996 +/- ##
===========================================
+ Coverage 91.82% 91.90% +0.08%
===========================================
Files 74 75 +1
Lines 1052 1063 +11
===========================================
+ Hits 966 977 +11
Misses 86 86 ☔ View full report in Codecov by Sentry. |
.github/workflows/cd.yml
Outdated
- name: Set up Unlighthouse Scan | ||
run: npm install -g @unlighthouse/cli puppeteer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this report generation should be outside deploy action, with the same conditions, but that's another thing tather deploy
spec/lib/convert_json_to_csv_spec.rb
Outdated
|
||
describe ".perform" do | ||
it "converts JSON to CSV" do | ||
ConvertJsonToCsv.perform(input_file, output_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before hook
spec/lib/convert_json_to_csv_spec.rb
Outdated
describe ".perform" do | ||
it "converts JSON to CSV" do | ||
ConvertJsonToCsv.perform(input_file, output_file) | ||
csv_content = CSV.read(output_file, headers: true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use let
app/lib/convert_json_to_csv.rb
Outdated
|
||
class ConvertJsonToCsv | ||
def self.perform(input_file, output_file) | ||
json_data = JSON.parse(File.read(input_file)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
json_data = JSON.parse(File.read(input_file)) | |
json_data = JSON.parse(File.read(input_file)) | |
app/lib/convert_json_to_csv.rb
Outdated
class ConvertJsonToCsv | ||
def self.perform(input_file, output_file) | ||
json_data = JSON.parse(File.read(input_file)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
write it as service object
app/lib/convert_json_to_csv.rb
Outdated
require "json" | ||
require "csv" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that should already present
app/lib/convert_json_to_csv.rb
Outdated
def self.perform(input_file, output_file) | ||
json_data = JSON.parse(File.read(input_file)) | ||
CSV.open(output_file, "w", write_headers: true, headers: json_data.first.keys) do |csv| | ||
json_data.each { |row| csv << row.values } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that would be fine to make link available to open
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it's possible
bin/convert_json_to_csv.rb
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use rake task for this
name: Unlighthouse reports | ||
|
||
on: | ||
workflow_dispatch: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be changed on:
workflow_run:
workflows:
- CD
types:
- completed
pull_request:
branches:
- develop
- master
types:
- closed
release:
types:
- published
after all checks
dev
Project
Code reviewers
Second Level Review
Summary of issue
Unlighthouse scanning should start after deployment to the stage. Reports upload as action artifacts.
Summary of change
CHECK LIST