From 3064118c777168f303fa5a1004f203ec9125ac92 Mon Sep 17 00:00:00 2001 From: fraz3alpha Date: Sun, 16 Feb 2020 17:19:39 +0000 Subject: [PATCH 1/3] Move testing until after the packaging step - This way the test resuts don't end up in the built zip file. --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5526acea..e0654706 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,14 +22,17 @@ before_install: - gem install bundler script: - # Run the tests against the Javascript libraries we have writte - - bash -c "cd ./browser-extensions/common/js && npm run test-with-coverage" # Only build the staging website if the github token is available, which means # that it will only happen for PRs from our own repo, not forks. - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then if [ "$RUNNING_CHALLENGES_GITHUB_TOKEN" != "" ]; then bash ./build/website/build-staging.sh; fi; fi' - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./build/website/build.sh; fi' - './build/extension-chrome/build.sh' - './build/extension-firefox/build.sh' + # Moving the test until after the build to start with, so that I can defer having to work out how + # not to bundle the coverage data into the extension zip files. + # Perhaps we should actually be testing the bundled code, rather than that in the repo, not sure. + # Run the tests against the Javascript libraries we have written + - bash -c "cd ./browser-extensions/common/js && npm run test-with-coverage" # branch whitelist. # For GitHub Pages - if we push code to master the built code goes to gh-pages From 925334e576f84a891a8056a7846cb5f5a1f93815 Mon Sep 17 00:00:00 2001 From: fraz3alpha Date: Sun, 16 Feb 2020 17:22:20 +0000 Subject: [PATCH 2/3] Print size of built extension artifacts --- build/extension-chrome/build.sh | 3 +++ build/extension-firefox/build.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/build/extension-chrome/build.sh b/build/extension-chrome/build.sh index cbe3970c..b8275784 100755 --- a/build/extension-chrome/build.sh +++ b/build/extension-chrome/build.sh @@ -64,3 +64,6 @@ cd ${TMP_BUILD_DIR} # zip -r extension.zip js/ html/ images/ css/ manifest.json web-ext lint web-ext build + +# Print the size of the built extension +ls -l "${TMP_BUILD_DIR}/web-ext-artifacts/running_challenges-*.zip" diff --git a/build/extension-firefox/build.sh b/build/extension-firefox/build.sh index 4da34737..c669b5e5 100755 --- a/build/extension-firefox/build.sh +++ b/build/extension-firefox/build.sh @@ -68,3 +68,6 @@ for i in patches/firefox/*.patch; do patch -p0 --directory "${TMP_BUILD_DIR}" < cd ${TMP_BUILD_DIR} web-ext lint web-ext build + +# Print the size of the built extension +ls -l "${TMP_BUILD_DIR}/web-ext-artifacts/running_challenges-*.zip" \ No newline at end of file From f76c12f92fce1fdff1e70857fe301c6d5407fa84 Mon Sep 17 00:00:00 2001 From: fraz3alpha Date: Sun, 16 Feb 2020 17:30:03 +0000 Subject: [PATCH 3/3] fix wrong path --- build/extension-chrome/build.sh | 2 +- build/extension-firefox/build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/extension-chrome/build.sh b/build/extension-chrome/build.sh index b8275784..70500899 100755 --- a/build/extension-chrome/build.sh +++ b/build/extension-chrome/build.sh @@ -66,4 +66,4 @@ web-ext lint web-ext build # Print the size of the built extension -ls -l "${TMP_BUILD_DIR}/web-ext-artifacts/running_challenges-*.zip" +ls -l web-ext-artifacts/running_challenges-*.zip diff --git a/build/extension-firefox/build.sh b/build/extension-firefox/build.sh index c669b5e5..da0b0638 100755 --- a/build/extension-firefox/build.sh +++ b/build/extension-firefox/build.sh @@ -70,4 +70,4 @@ web-ext lint web-ext build # Print the size of the built extension -ls -l "${TMP_BUILD_DIR}/web-ext-artifacts/running_challenges-*.zip" \ No newline at end of file +ls -l web-ext-artifacts/running_challenges-*.zip \ No newline at end of file