From 2620eb52c9bb32b9cb23c4675d25b2937032bdfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=8D=9A=E4=BB=81=28Buo-ren=20Lin=29?= Date: Sun, 28 Apr 2019 10:50:04 +0800 Subject: [PATCH] Support snap building and testing in Travis CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This ensure snap build-time and run-time problems will be noticed more promptly by the maintainers, like issue #229. Signed-off-by: ๆž—ๅšไป(Buo-ren Lin) --- .travis.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a1c1942f56..e6397dc694 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,10 +14,23 @@ matrix: dist: xenial - python: "3.6" env: GALLERYDL_TESTS=results + - language: minimal + dist: xenial + + addons: + snaps: + - name: snapcraft + classic: true + - name: multipass + classic: true + channel: beta + + env: SNAP_TESTS=true git: depth: 3 quiet: true + branches: only: - master @@ -25,4 +38,5 @@ branches: - /^test(-\w+)+$/ script: - - ./scripts/run_tests.sh + - 'if test "${SNAP_TESTS}" != true; then ./scripts/run_tests.sh; fi' + - 'if test "${SNAP_TESTS}" = true; then sudo apt update && snapcraft && sudo snap try && snap run gallery-dl; else true; fi'