From 9ecbf2f47adc448c5deef6234a369e24019b1f8f Mon Sep 17 00:00:00 2001 From: Hassan Hafez Date: Tue, 31 Dec 2019 23:15:00 +0200 Subject: [PATCH] run with lighthouse ci default config --- .circleci/config.yml | 15 ++++++--------- lighthouserc.json | 41 ----------------------------------------- 2 files changed, 6 insertions(+), 50 deletions(-) delete mode 100644 lighthouserc.json diff --git a/.circleci/config.yml b/.circleci/config.yml index 41a1cf1..0106275 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,3 +1,4 @@ +# circle ci config.yml version: 2 jobs: build: @@ -13,15 +14,11 @@ jobs: # fallback to using the latest cache if no exact match is found - v1-dependencies- - - run: - name: 'Setup custom environment variables' - command: | - echo ' - export REACT_NODE_ENV="production" - ' >> $BASH_ENV + # install lhci command line interface - run: sudo npm install -g @lhci/cli@0.3.x - - run: sudo npm install -g serve + # install dependencies - run: npm install + # build project - run: npm run build - save_cache: @@ -30,6 +27,6 @@ jobs: key: v1-dependencies-{{ checksum "yarn.lock" }} # run tests! - - run: npm run bundlesize - - run: lhci autorun || echo "LHCI failed 😞!" - run: yarn test + # run lighthouse with default config + - run: lhci autorun || echo "LHCI failed 😞!" diff --git a/lighthouserc.json b/lighthouserc.json deleted file mode 100644 index 9de160e..0000000 --- a/lighthouserc.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "ci": { - "assert": { - "assertions": { - "categories:performance": [ - "error", - { - "minScore": 0.9 - } - ], - "categories:accessibility": [ - "warn", - { - "minScore": 0.8 - } - ], - "categories:seo": [ - "warn", - { - "minScore": 0.8 - } - ], - "categories:best-practices": [ - "warn", - { - "minScore": 0.8 - } - ] - } - }, - "collect": { - "numberOfRuns": 3, - "startServerCommand": "serve -s build -l 6174", - "url": ["http://localhost:6174/", "http://localhost:6174/products"] - }, - "upload": { - "target": "lhci", - "serverBaseUrl": "https://lhci-server-demo.herokuapp.com/app/projects" - } - } -}