diff options
Diffstat (limited to '.circleci')
-rw-r--r-- | .circleci/config.yml | 102 | ||||
-rwxr-xr-x | .circleci/scripts/firefox-download.sh | 17 | ||||
-rwxr-xr-x | .circleci/scripts/firefox-install.sh | 4 |
3 files changed, 66 insertions, 57 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index bc40c9a7c..7063f3113 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -97,43 +97,45 @@ workflows: jobs: prep-deps-npm: docker: - - image: circleci/node:8-browsers + - image: circleci/node:8.11.3-browsers steps: - checkout - restore_cache: - key: dependency-cache-{{ .Revision }} + keys: + - dependency-cache-{{ checksum "package-lock.json" }} + # fallback to using the latest cache if no exact match is found + - dependency-cache- - run: - name: Install deps via npm - command: npm install + name: Install npm 6 + deps via npm + command: | + sudo npm install -g npm@6.1.0 && npm install - save_cache: key: dependency-cache-{{ checksum "package-lock.json" }} paths: - node_modules - - save_cache: - key: dependency-cache-{{ .Revision }} - paths: - - node_modules prep-deps-firefox: docker: - - image: circleci/node:8-browsers + - image: circleci/node:8.11.3-browsers steps: - checkout + - restore_cache: + key: dependency-cache-firefox- - run: - name: Download Firefox + name: Download Firefox If needed command: ./.circleci/scripts/firefox-download.sh - save_cache: - key: dependency-cache-firefox-{{ .Revision }} + key: dependency-cache-firefox- paths: - firefox prep-build: docker: - - image: circleci/node:8-browsers + - image: circleci/node:8.11.3-browsers steps: - checkout - restore_cache: - key: dependency-cache-{{ .Revision }} + key: dependency-cache-{{ checksum "package-lock.json" }} - run: name: build:dist command: npm run dist @@ -148,11 +150,11 @@ jobs: prep-docs: docker: - - image: circleci/node:8-browsers + - image: circleci/node:8.11.3-browsers steps: - checkout - restore_cache: - key: dependency-cache-{{ .Revision }} + key: dependency-cache-{{ checksum "package-lock.json" }} - run: name: build:dist command: npm run doc @@ -163,11 +165,11 @@ jobs: prep-scss: docker: - - image: circleci/node:8-browsers + - image: circleci/node:8.11.3-browsers steps: - checkout - restore_cache: - key: dependency-cache-{{ .Revision }} + key: dependency-cache-{{ checksum "package-lock.json" }} - run: name: Get Scss Cache key # this allows us to checksum against a whole directory @@ -182,33 +184,33 @@ jobs: test-lint: docker: - - image: circleci/node:8-browsers + - image: circleci/node:8.11.3-browsers steps: - checkout - restore_cache: - key: dependency-cache-{{ .Revision }} + key: dependency-cache-{{ checksum "package-lock.json" }} - run: name: Test command: npm run lint test-deps: docker: - - image: circleci/node:8-browsers + - image: circleci/node:8.11.3-browsers steps: - checkout - restore_cache: - key: dependency-cache-{{ .Revision }} + key: dependency-cache-{{ checksum "package-lock.json" }} - run: name: Test command: npx nsp check test-e2e-chrome: docker: - - image: circleci/node:8-browsers + - image: circleci/node:8.11.3-browsers steps: - checkout - restore_cache: - key: dependency-cache-{{ .Revision }} + key: dependency-cache-{{ checksum "package-lock.json" }} - restore_cache: key: build-cache-{{ .Revision }} - run: @@ -220,16 +222,16 @@ jobs: test-e2e-firefox: docker: - - image: circleci/node:8-browsers + - image: circleci/node:8.11.3-browsers steps: - checkout - restore_cache: - key: dependency-cache-firefox-{{ .Revision }} + key: dependency-cache-firefox- - run: name: Install firefox command: ./.circleci/scripts/firefox-install.sh - restore_cache: - key: dependency-cache-{{ .Revision }} + key: dependency-cache-{{ checksum "package-lock.json" }} - restore_cache: key: build-cache-{{ .Revision }} - run: @@ -241,11 +243,11 @@ jobs: test-e2e-beta-chrome: docker: - - image: circleci/node:8-browsers + - image: circleci/node:8.11.3-browsers steps: - checkout - restore_cache: - key: dependency-cache-{{ .Revision }} + key: dependency-cache-{{ checksum "package-lock.json" }} - restore_cache: key: build-cache-{{ .Revision }} - run: @@ -257,16 +259,16 @@ jobs: test-e2e-beta-firefox: docker: - - image: circleci/node:8-browsers + - image: circleci/node:8.11.3-browsers steps: - checkout - restore_cache: - key: dependency-cache-firefox-{{ .Revision }} + key: dependency-cache-firefox- - run: name: Install firefox command: ./.circleci/scripts/firefox-install.sh - restore_cache: - key: dependency-cache-{{ .Revision }} + key: dependency-cache-{{ checksum "package-lock.json" }} - restore_cache: key: build-cache-{{ .Revision }} - run: @@ -278,11 +280,11 @@ jobs: job-screens: docker: - - image: circleci/node:8-browsers + - image: circleci/node:8.11.3-browsers steps: - checkout - restore_cache: - key: dependency-cache-{{ .Revision }} + key: dependency-cache-{{ checksum "package-lock.json" }} - restore_cache: key: build-cache-{{ .Revision }} - run: @@ -295,11 +297,11 @@ jobs: job-publish-prerelease: docker: - - image: circleci/node:8-browsers + - image: circleci/node:8.11.3-browsers steps: - checkout - restore_cache: - key: dependency-cache-{{ .Revision }} + key: dependency-cache-{{ checksum "package-lock.json" }} - restore_cache: key: build-cache-{{ .Revision }} - restore_cache: @@ -322,11 +324,11 @@ jobs: job-publish-release: docker: - - image: circleci/node:8-browsers + - image: circleci/node:8.11.3-browsers steps: - checkout - restore_cache: - key: dependency-cache-{{ .Revision }} + key: dependency-cache-{{ checksum "package-lock.json" }} - restore_cache: key: build-cache-{{ .Revision }} - restore_cache: @@ -345,11 +347,11 @@ jobs: test-unit: docker: - - image: circleci/node:8-browsers + - image: circleci/node:8.11.3-browsers steps: - checkout - restore_cache: - key: dependency-cache-{{ .Revision }} + key: dependency-cache-{{ checksum "package-lock.json" }} - run: name: test:coverage command: npm run test:coverage @@ -358,16 +360,16 @@ jobs: environment: browsers: '["Firefox"]' docker: - - image: circleci/node:8-browsers + - image: circleci/node:8.11.3-browsers steps: - checkout - restore_cache: - key: dependency-cache-firefox-{{ .Revision }} + key: dependency-cache-firefox- - run: name: Install firefox command: ./.circleci/scripts/firefox-install.sh - restore_cache: - key: dependency-cache-{{ .Revision }} + key: dependency-cache-{{ checksum "package-lock.json" }} - run: name: Get Scss Cache key # this allows us to checksum against a whole directory @@ -382,11 +384,11 @@ jobs: environment: browsers: '["Chrome"]' docker: - - image: circleci/node:8-browsers + - image: circleci/node:8.11.3-browsers steps: - checkout - restore_cache: - key: dependency-cache-{{ .Revision }} + key: dependency-cache-{{ checksum "package-lock.json" }} - run: name: Get Scss Cache key # this allows us to checksum against a whole directory @@ -401,16 +403,16 @@ jobs: environment: browsers: '["Firefox"]' docker: - - image: circleci/node:8-browsers + - image: circleci/node:8.11.3-browsers steps: - checkout - restore_cache: - key: dependency-cache-firefox-{{ .Revision }} + key: dependency-cache-firefox- - run: name: Install firefox command: ./.circleci/scripts/firefox-install.sh - restore_cache: - key: dependency-cache-{{ .Revision }} + key: dependency-cache-{{ checksum "package-lock.json" }} - run: name: Get Scss Cache key # this allows us to checksum against a whole directory @@ -425,11 +427,11 @@ jobs: environment: browsers: '["Chrome"]' docker: - - image: circleci/node:8-browsers + - image: circleci/node:8.11.3-browsers steps: - checkout - restore_cache: - key: dependency-cache-{{ .Revision }} + key: dependency-cache-{{ checksum "package-lock.json" }} - run: name: Get Scss Cache key # this allows us to checksum against a whole directory @@ -442,7 +444,7 @@ jobs: all-tests-pass: docker: - - image: circleci/node:8-browsers + - image: circleci/node:8.11.3-browsers steps: - run: name: All Tests Passed diff --git a/.circleci/scripts/firefox-download.sh b/.circleci/scripts/firefox-download.sh index c63e8c3df..64f0c74e3 100755 --- a/.circleci/scripts/firefox-download.sh +++ b/.circleci/scripts/firefox-download.sh @@ -1,6 +1,13 @@ #!/usr/bin/env bash - -echo "Downloading firefox..." -wget https://ftp.mozilla.org/pub/firefox/releases/58.0/linux-x86_64/en-US/firefox-58.0.tar.bz2 \ -&& tar xjf firefox-58.0.tar.bz2 -echo "firefox download complete" +echo "Checking if firefox was already downloaded" +if [ -d "firefox" ] +then + echo "Firefox found. No need to download" +else + FIREFOX_VERSION="61.0.1" + FIREFOX_BINARY="firefox-$FIREFOX_VERSION.tar.bz2" + echo "Downloading firefox..." + wget "https://ftp.mozilla.org/pub/firefox/releases/$FIREFOX_VERSION/linux-x86_64/en-US/$FIREFOX_BINARY" \ + && tar xjf "$FIREFOX_BINARY" + echo "firefox download complete" +fi diff --git a/.circleci/scripts/firefox-install.sh b/.circleci/scripts/firefox-install.sh index 589bcbbb5..1c60f4de9 100755 --- a/.circleci/scripts/firefox-install.sh +++ b/.circleci/scripts/firefox-install.sh @@ -2,7 +2,7 @@ echo "Installing firefox..." sudo rm -r /opt/firefox -sudo mv firefox /opt/firefox58 +sudo mv firefox /opt/firefox61 sudo mv /usr/bin/firefox /usr/bin/firefox-old -sudo ln -s /opt/firefox58/firefox /usr/bin/firefox +sudo ln -s /opt/firefox61/firefox /usr/bin/firefox echo "Firefox installed." |