From f45b454e11e1cacb2c7fab516a7caaadcccf5929 Mon Sep 17 00:00:00 2001 From: DD Liu Date: Tue, 30 Jul 2019 10:18:03 -0400 Subject: [PATCH 1/7] Downgrade canvas prebuilt because 2.0 isn't working and breaks unit tests --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8f9fe49d..b7731151 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "babel-plugin-transform-object-rest-spread": "^6.22.0", "babel-preset-env": "^1.6.1", "babel-preset-react": "^6.22.0", - "canvas-prebuilt": "^2.0.0-alpha.14", + "canvas-prebuilt": "^1.6.11", "css-loader": "3.1.0", "enzyme": "^3.6.0", "enzyme-adapter-react-16": "^1.5.0", From 09e1e95b2644b7cdb35efbe9065d15714711acac Mon Sep 17 00:00:00 2001 From: DD Liu Date: Tue, 30 Jul 2019 10:25:48 -0400 Subject: [PATCH 2/7] Try to use addons instead of sudo --- .travis.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 60e9bb09..2d908ac7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,20 @@ language: node_js -sudo: required -dist: trusty node_js: - 8 +addons: + apt: + packages: + - g++-4.9 + - git + - libcairo2-dev + - libpango1.0-dev + - libssl-dev + - libjpeg62-dev + - libgif-dev cache: directories: - node_modules install: -- sudo apt-get update && sudo apt-get install -y libcairo2-dev libpango1.0-dev libssl-dev libjpeg62-dev libgif-dev pkg-config - npm install canvas@1.6.7 - npm --production=false install - npm --production=false update From 5ba709cf76c02def6d6728df2a2e6c93d2b727ef Mon Sep 17 00:00:00 2001 From: DD Liu Date: Tue, 30 Jul 2019 18:22:38 -0400 Subject: [PATCH 3/7] remove some stuff I don't think we need --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2d908ac7..2e1b98e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,6 @@ node_js: addons: apt: packages: - - g++-4.9 - - git - libcairo2-dev - libpango1.0-dev - libssl-dev From 0c0910a8d521e8ee011265ffe2da47cab762ff02 Mon Sep 17 00:00:00 2001 From: DD Liu Date: Tue, 30 Jul 2019 18:29:24 -0400 Subject: [PATCH 4/7] match canvas version with canvas-prebuilt --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2e1b98e3..b6f1bb6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ cache: directories: - node_modules install: -- npm install canvas@1.6.7 +- npm install canvas@1.6.11 - npm --production=false install - npm --production=false update before_deploy: From 8c7d0da5db68a4c32f7ba9848b96ee7ebfb3c2b0 Mon Sep 17 00:00:00 2001 From: DD Liu Date: Tue, 30 Jul 2019 19:05:20 -0400 Subject: [PATCH 5/7] use jobs --- .travis.yml | 82 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 51 insertions(+), 31 deletions(-) diff --git a/.travis.yml b/.travis.yml index b6f1bb6a..098979a1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: node_js node_js: - 8 +- 10 addons: apt: packages: @@ -9,6 +10,11 @@ addons: - libssl-dev - libjpeg62-dev - libgif-dev +env: + global: + - NODE_ENV=production + matrix: + - NPM_SCRIPT="unit -- --jobs=1" cache: directories: - node_modules @@ -16,34 +22,48 @@ install: - npm install canvas@1.6.11 - npm --production=false install - npm --production=false update -before_deploy: -- npm --no-git-tag-version version 0.2.0-prerelease.$(date +%Y%m%d%H%M%S) -- git config --global user.email $(git log --pretty=format:"%ae" -n1) -- git config --global user.name $(git log --pretty=format:"%an" -n1) -deploy: -- provider: script - node_js: 8 - on: - all_branches: true - condition: $TRAVIS_BRANCH != develop && $TRAVIS_EVENT_TYPE != cron - skip_cleanup: true - script: npm run deploy -- -x -e $TRAVIS_BRANCH -r https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git -- provider: script - on: - branch: develop - condition: $TRAVIS_EVENT_TYPE != cron - skip_cleanup: true - script: npm run --silent deploy -- -x -a -r https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git -- provider: npm - on: - branch: develop - condition: $TRAVIS_EVENT_TYPE != cron - skip_cleanup: true - email: $NPM_EMAIL - api_key: $NPM_TOKEN -- provider: script - on: - branch: develop - condition: $TRAVIS_EVENT_TYPE == cron - skip_cleanup: true - script: npm run i18n:src && npm run i18n:push +script: npm run $NPM_SCRIPT +jobs: + include: + - env: NPM_SCRIPT=lint + node_js: 8 + - env: NPM_SCRIPT=build + node_js: 8 + if: not (branch in (master, develop) and type != pull_request) + - stage: release + node_js: 8 + env: NPM_SCRIPT=build + before_deploy: + - npm --no-git-tag-version version 0.2.0-prerelease.$(date +%Y%m%d%H%M%S) + - git config --global user.email $(git log --pretty=format:"%ae" -n1) + - git config --global user.name $(git log --pretty=format:"%an" -n1) + deploy: + - provider: script + on: + all_branches: true + condition: $TRAVIS_BRANCH != develop && $TRAVIS_EVENT_TYPE != cron + skip_cleanup: true + script: npm run deploy -- -x -e $TRAVIS_BRANCH -r https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git + - provider: script + on: + branch: develop + condition: $TRAVIS_EVENT_TYPE != cron + skip_cleanup: true + script: npm run --silent deploy -- -x -a -r https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git + - provider: npm + on: + branch: develop + condition: $TRAVIS_EVENT_TYPE != cron + skip_cleanup: true + email: $NPM_EMAIL + api_key: $NPM_TOKEN + - provider: script + on: + branch: develop + condition: $TRAVIS_EVENT_TYPE == cron + skip_cleanup: true + script: npm run i18n:src && npm run i18n:push +stages: +- test +- name: release + if: branch in (master, develop) and type != pull_request From 505d39ae812a514e7c3c8010eacdb8a5c14f0a8e Mon Sep 17 00:00:00 2001 From: DD Liu Date: Tue, 30 Jul 2019 21:47:40 -0400 Subject: [PATCH 6/7] try to fix jobs --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 098979a1..dcbe772e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ env: global: - NODE_ENV=production matrix: - - NPM_SCRIPT="unit -- --jobs=1" + - NPM_SCRIPT="unit" cache: directories: - node_modules From f16b672bfe0f6206349da2159fc746b372385fbd Mon Sep 17 00:00:00 2001 From: DD Liu Date: Fri, 2 Aug 2019 14:29:05 -0400 Subject: [PATCH 7/7] Remove redundant lines --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7d4bd158..78eafe6c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,12 +25,9 @@ script: npm run $NPM_SCRIPT jobs: include: - env: NPM_SCRIPT=lint - node_js: 8 - env: NPM_SCRIPT=build - node_js: 8 if: not (branch in (master, develop) and type != pull_request) - stage: release - node_js: 8 env: NPM_SCRIPT=build before_deploy: - npm --no-git-tag-version version 0.2.0-prerelease.$(date +%Y%m%d%H%M%S)