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

.gimbalrc.yml in root folder being ignored #160

Open
bronz3beard opened this issue Oct 18, 2019 · 5 comments · May be fixed by #161
Open

.gimbalrc.yml in root folder being ignored #160

bronz3beard opened this issue Oct 18, 2019 · 5 comments · May be fixed by #161
Labels
bug Something isn't working

Comments

@bronz3beard
Copy link

bronz3beard commented Oct 18, 2019

Describe the bug
The lighthouse audit thresholds set in my .gimbalrc.yml seem to be ignored when running the audit command, and command gimbal audit runs and produces a report but exits with an error:
error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

To Reproduce

install dev dependencies:
"devDependencies": {
"@modus/gimbal": "^1.2.6",
"@modus/gimbal-plugin-axe": "^1.2.6",
"@modus/gimbal-plugin-last-value": "^1.2.6",
"@modus/gimbal-plugin-sqlite": "^1.2.6"
}

test script before setting up .gimbalrc.yml

"scripts": {
"gimbal-audit": "gimbal audit"
}

run script:
yarn run gimbal-audit

OUTPUT:
Label │ Value │ Threshold │ Success │
│ Size Checks [ success: ✓ ]│
│ Heap Snapshot Checks [ success: x ] │
│ Documents │ 3 │ 5 │ ✓ │
│ Frames │ 1 │ 2 │ ✓ │
│ JSHeapTotalSize │ 23199744 │ │ ✓ │
│ JSHeapUsedSize │ 15893968 │ │ ✓ │
│ LayoutCount │ 2 │ 5 │ ✓ │
│ Nodes │ 1381 │ 75 │ x │
│ RecalcStyleCount │ 4 │ 6 │ ✓ │
│ Unused Source Checks [ success: x ] │
http://localhost:3000/ │ 68.63% │ 65% │ x │
│ ... p://localhost:3000/static/css/2.b31c041a.chunk.css │ 100.00% │ 35% │ x │
│ ... /localhost:3000/static/css/main.3d2bbf6e.chunk.css │ 89.62% │ 35% │ x │
http://localhost:3000/ │ 23.33% │ 30% │ ✓ │
│ ... ttp://localhost:3000/static/js/2.b80883ac.chunk.js │ 69.57% │ 70% │ ✓ │
│ ... ://localhost:3000/static/js/main.aae40300.chunk.js │ 53.01% │ 15% │ x │
│ Lighthouse Audits [ success: x ]│
│ Performance │ 0 │ 50 │ x │
│ Accessibility │ 79 │ 75 │ ✓ │
│ Best Practices │ 100 │ 95 │ ✓ │
│ SEO │ 82 │ 90 │ x │
│ Progressive Web App │ 28 │ 50 │ x │

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Add .gimbalrc.yml to root folder of project

The .gimbalrc.yml is configured by default from here,
changes include;

  • lighthouse audit thresholds changed to 95
  • output directory changed to folder in source folder.

Run script:
yarn run gimbal-audit

OUTPUT:
Same results as above with same error.

Expected behaviour
I am expecting my lighthouse audit thresholds to all be 95 and for the script to run, produce a report without an error.

Screenshots
image

.gimbalrc.yml
image

Desktop (please complete the following information):

  • OS: [Windows 10]
  • Browser [Firefox]
  • Version 69.0.3 (64-bit)

Additional context
Due to the .gimbalre.yml being ignored there is no output in the artifacts folder.
I suspect this is more a me issue than a gimbal issue but I was not able to find many answers online so I wanted to raise an issue with the source :-)

I am pretty excited about having this setup, and once this small issue is clarified I am looking to add a github action 😃
Please let me know if i need to provide any further information.

@bronz3beard bronz3beard added the bug Something isn't working label Oct 18, 2019
@bronz3beard bronz3beard linked a pull request Oct 18, 2019 that will close this issue
4 tasks
@mitchellsimoens
Copy link
Collaborator

Thank you for trying Gimbal and sorry you have come across an issue.

I in no way, doubt the bug as you have provided a lot to work with. However, trying it out myself I could not reproduce the issue. I started with a new CRA app, added devDependencies and scripts to package.json, added the .gimbalrc.yml file, couple things to a gitignore and was able to run the script and it picked up the .gimbalrc.yml file. To help, I created a repo so you can see the necessary files and the commit to specifically add teh gimbal stuff is here.

The output of this is:

Screen Shot 2019-10-18 at 8 03 16 AM

Now, the only difference here is I see you are using Windows 10 and I'm using Mac but I would be surprised to find out that finding the file is different. We do use globby to find the gimbal config file (since we also support json and js config files) and globby is an extremely popular module. I'll attempt to get a VM running today and retest the repo I created.

@mitchellsimoens
Copy link
Collaborator

Attempted on a Win 10 VM and ran into this issue I'm trying to work around: GoogleChrome/lighthouse#9860

@mitchellsimoens
Copy link
Collaborator

Worked around it by commenting out lighthouse and looks like I can reproduce it. On windows, I'm required to use the --config option like your PR adds, however, instead of that, I'd like to see why it's required at all.

@bronz3beard
Copy link
Author

@mitchellsimoens Thanks so much for all your feedback, I really appreciate it!!
I totally understand wanting to find the "why", my PR is just a temp fix for anyone else who might find this issue.
For now I will stick with my solution and im sure you will find the more elegant way to sort it out 😃

If I can provide any other insight or food for thought, I will add it here 😃

Thanks again

@grgur
Copy link
Member

grgur commented Oct 29, 2019

Thanks for reporting @bronz3beard!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants