From 8e171dc0775cf9d73a18715124ab27ccfeeb2e5d Mon Sep 17 00:00:00 2001 From: Bartek Szopka <83575+bartaz@users.noreply.github.com> Date: Wed, 4 Mar 2020 16:18:53 +0100 Subject: [PATCH 1/3] Add .circleci/config.yml --- .circleci/config.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000000..2593aa6497 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,38 @@ +version: 2 + +defaults: &defaults + docker: + - image: canonicalwebteam/dev:v1.6.7 + +jobs: + percy: + <<: *defaults + steps: + - checkout + - run: + # https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md#chrome-headless-doesnt-launch-on-unix + name: Install puppeteer dependencies + command: | + apt-get update + apt-get -yq install gconf-service libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxss1 libxtst6 libappindicator1 libnss3 libasound2 libatk1.0-0 libc6 ca-certificates fonts-liberation lsb-release xdg-utils wget + - run: + name: Install dependencies + command: yarn && pip3 install -r requirements.txt + - run: + name: Build the site resources + command: yarn build + - run: + name: Run the site server + command: ./entrypoint 0.0.0.0:80 + background: true + - run: + name: Wait for development server + command: sleep 5 + - run: + name: Snapshot screenshots + command: yarn percy +workflows: + version: 2 + build: + jobs: + - percy From 6fbe3b725feba133a0e7176c52b66d2c784a7696 Mon Sep 17 00:00:00 2001 From: Bartek Szopka Date: Wed, 4 Mar 2020 16:58:13 +0100 Subject: [PATCH 2/3] Fix server port --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2593aa6497..d863042191 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,7 +23,7 @@ jobs: command: yarn build - run: name: Run the site server - command: ./entrypoint 0.0.0.0:80 + command: ./entrypoint 0.0.0.0:${PORT} background: true - run: name: Wait for development server From 80ba08cf62cd37c34cc78d481476a9ece65f1e37 Mon Sep 17 00:00:00 2001 From: Bartek Szopka Date: Wed, 4 Mar 2020 17:23:12 +0100 Subject: [PATCH 3/3] Remove travis config --- .travis.yml | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8884ef60de..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: python -before_install: - - nvm install 12 -install: - - yarn install - - pip3 install -r requirements.txt -before_script: - - yarn run build -script: - - yarn run test - - ./entrypoint 0.0.0.0:${PORT} & - - sleep 5 - - yarn run percy -notifications: - irc: - channels: - - 'chat.freenode.net#vanilla-framework' - on_success: change - on_failure: always - slack: - rooms: - - vanillaframework:wvRcrt4C6ODhvHxrUkTaKlD5#general