Performance feedback
We have added a script to Gitlab's CI to give performance feedback from the Google Page Speed Insights API whenever you create a merge request. All new shops will have this functionality by default however if you have an older shop you will have to make a small change to your CI file to opt in to this feature.
Editing your .gitlab-ci.yml file
In your gitlab-ci.yml
under stages
where you would currently see this:
stages:
- build
- test
- review
- staging
- production
Pease add a performance
stage at the end like so:
stages:
- build
- test
- review
- staging
- production
- performance
Finally please add the following to the end of your gitlab-ci.yml
file.
performance:
stage: performance
image: ${DOCKER_REGISTRY}/ci-performance
environment:
name: review/$CI_COMMIT_REF_NAME
allow_failure: true
script:
- run_page_speed
only:
- branches
except:
- master