]> git.ipfire.org Git - thirdparty/bulma.git/commitdiff
Add travis-ci to run tests before merging a PR (#1184)
authorbstashio <bstashio@tuta.io>
Fri, 15 Sep 2017 18:34:10 +0000 (21:34 +0300)
committerJeremy Thomas <bbxdesign@gmail.com>
Fri, 15 Sep 2017 18:34:10 +0000 (19:34 +0100)
* Add .travis.yml

* Add travis tester script

* Update .gitignore with test output related directive

.gitignore
.travis.yml [new file with mode: 0644]
test/sass-compile-tester.sh [new file with mode: 0755]

index 430cf609a85ca5ae5bbd202484af6efbe893c32d..2bf50090146c63c2d655def774cfb434641a16d7 100644 (file)
@@ -10,3 +10,4 @@ npm-debug.log
 _gh_pages
 _site
 node_modules
+test/output/
diff --git a/.travis.yml b/.travis.yml
new file mode 100644 (file)
index 0000000..5c64a5a
--- /dev/null
@@ -0,0 +1,6 @@
+script:
+ - "test/sass-compile-tester.sh"
+
+language: sass
+before_install:
+ - gem install sass
\ No newline at end of file
diff --git a/test/sass-compile-tester.sh b/test/sass-compile-tester.sh
new file mode 100755 (executable)
index 0000000..82450d5
--- /dev/null
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+
+
+# ==============================================================================
+# FUNCTIONS - START
+# ==============================================================================
+
+run_it()
+{
+       
+       local _src="${1-bulma.sass}"
+       local _dest="${2-$(dirname "${BASH_SOURCE[0]}")/output/$(basename ${_src}).css}"
+       local _options="${3---sourcemap=none}"
+
+       # ----------------------------------------------------------------------------
+       
+       local _dest_dir="$(dirname "${_dest}")"
+       
+       if [ ! -d "${_dest_dir}" ]; then
+       
+               mkdir -p "${_dest_dir}"
+       
+       fi
+
+       # ----------------------------------------------------------------------------
+       
+       sass "${_src}" "${_dest}" ${_options}
+       
+}
+# run_it()
+
+# ==============================================================================
+# FUNCTIONS - END
+# ==============================================================================
+
+
+
+# ==============================================================================
+# EXECUTION - START
+# ==============================================================================
+
+run_it $@
+
+# ==============================================================================
+# EXECUTION - END
+# ==============================================================================