diff --git a/.circleci/config.yml b/.circleci/config.yml index 41a1cf1..202d750 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,3 +1,4 @@ +# circle ci config.yml version: 2 jobs: build: @@ -8,28 +9,24 @@ jobs: - checkout # Download and cache dependencies - restore_cache: - keys: - - v1-dependencies-{{ checksum "yarn.lock" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- + keys: + - v1-dependencies-{{ checksum "yarn.lock" }} + # 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: - paths: - - node_modules - key: v1-dependencies-{{ checksum "yarn.lock" }} + paths: + - node_modules + 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" - } - } -}