From 920092ae0ee924646269d238b6a2ac96b900f8e8 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Thu, 6 Jun 2019 15:59:22 -0400 Subject: [PATCH 1/7] more travis --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 1ee25d02cc37..03d527515222 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,10 @@ + +# Ideally nobody should push PRs to the "origin" repo. +# Remove this once the repo is moved to the 'mdn' org. +branches: + only: + - master + language: node_js node_js: stable From 0d37b63f57f1ea9fd5ca4199f31c9c9ff43d5bc7 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Thu, 6 Jun 2019 16:00:39 -0400 Subject: [PATCH 2/7] yarn caching --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 03d527515222..693a7f186822 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ node_js: stable matrix: include: - name: client + cache: yarn script: - set -e - cd client && yarn run test From b9814f6abf3986801e33ada0a24c49b697f96a7a Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Thu, 6 Jun 2019 16:04:52 -0400 Subject: [PATCH 3/7] dedicate script instead --- .travis.yml | 4 +--- scripts/ci-client.sh | 11 +++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100755 scripts/ci-client.sh diff --git a/.travis.yml b/.travis.yml index 693a7f186822..c813b300f48a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,4 @@ matrix: - name: client cache: yarn script: - - set -e - - cd client && yarn run test - - cd client && yarn run build + - ./scripts/ci-client.sh diff --git a/scripts/ci-client.sh b/scripts/ci-client.sh new file mode 100755 index 000000000000..d0b9bd1f86f4 --- /dev/null +++ b/scripts/ci-client.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -ex + +# If you run this locally, the jest test runner will +# start in interactive mode. To make it like in CI +# execute this script like `CI=true ./scripts/ci-client.sh + +cd client +yarn +yarn run test +yarn run build From e02f7c2f3689a7ceffd6a8fc39174b8531ab9c03 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Thu, 6 Jun 2019 16:53:42 -0400 Subject: [PATCH 4/7] end-to-end testing --- .travis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.travis.yml b/.travis.yml index c813b300f48a..4582119f9bd0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,3 +14,13 @@ matrix: cache: yarn script: - ./scripts/ci-client.sh + - end-to-end: + cache: yarn + script: + - make build-content + # Commented out June 6 because at the moment 'make deployment-build' will fail + # - make deployment-build + - yarn-audit: + cache: yarn + script: + - make yarn-audit-all From 273517663672fb15135bb78af11e8e2ff88407af Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Thu, 6 Jun 2019 16:57:55 -0400 Subject: [PATCH 5/7] more modern version of yarn --- .travis.yml | 5 +++++ README.md | 2 ++ 2 files changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 4582119f9bd0..42321f0fc07d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,11 @@ branches: language: node_js node_js: stable +# Because https://github.com/travis-ci/travis-ci/issues/9445 +before_install: + - npm install -g yarn + - yarn --version + matrix: include: - name: client diff --git a/README.md b/README.md index e69c03099d67..9844f376da2f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # mdn2 +[![Build Status](https://travis-ci.org/peterbe/mdn2.svg?branch=master)](https://travis-ci.org/peterbe/mdn2) + **THIS IS HIGHLY EXPERIMENTAL AND LIKELY TO CHANGE DRASTICALLY** ## Overview From 924ce0594eec43e6713e0beb0361332e7be52ec2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Thu, 6 Jun 2019 17:07:00 -0400 Subject: [PATCH 6/7] better names --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 42321f0fc07d..5bf837df80e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,13 +19,13 @@ matrix: cache: yarn script: - ./scripts/ci-client.sh - - end-to-end: + - name: end-to-end cache: yarn script: - make build-content # Commented out June 6 because at the moment 'make deployment-build' will fail # - make deployment-build - - yarn-audit: + - name: yarn-audit cache: yarn script: - make yarn-audit-all From b998a91155655457efd8974f1aef4c591c49bd0e Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Thu, 6 Jun 2019 17:12:56 -0400 Subject: [PATCH 7/7] make install before --- .travis.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.travis.yml b/.travis.yml index 5bf837df80e3..17b491f40e38 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,10 +8,19 @@ branches: language: node_js node_js: stable +cache: + yarn: true + directories: + - client/node_modules + - server/node_modules + - cli/node_modules + # Because https://github.com/travis-ci/travis-ci/issues/9445 before_install: - npm install -g yarn - yarn --version + # All nodes of the matrix will + - make install matrix: include: