<NME> tox.ini
<BEF> ADDFILE
<MSG> chore: automatically build binary wheels for Linux, macOS, Windows

<DFF> @@ -0,0 +1,44 @@
+[tox]
+envlist =
+  skip-browser-tests,chrome,firefox,firefox-xvfb
+skip_missing_interpreters = true
+
+[testenv]
+# Include numpy in deps to ensure the package is built with the same version as
+# is installed.  Otherwise, setup_requires may result in it being built with a
+# prerelease version that is incompatible with the installed version.
+deps =
+  numpy
+
+extras =
+  test
+  chrome,firefox: test-browser
+  chrome: test-chrome
+  firefox: test-firefox
+
+whitelist_externals =
+  xvfb-run
+
+# Pass through DISPLAY to allow non-headless web browsers on Linux
+passenv = DISPLAY
+
+setenv =
+  PYTHONUNBUFFERED = yes
+
+changedir = python/tests
+
+# browser-based tests are flaky and can hang, so set a 30 second timeout and retry up to 5 times.
+# Use `timeout_func_only=true` to work around https://github.com/pytest-dev/pytest-rerunfailures/issues/99
+commands = pytest -vv -s --timeout=30 -o timeout_func_only=true --reruns 5
+
+[testenv:skip-browser-tests]
+commands = {[testenv]commands} --skip-browser-tests
+
+[testenv:chrome]
+commands = {[testenv]commands} --browser chrome
+
+[testenv:firefox]
+commands = {[testenv]commands} --browser firefox
+
+[testenv:firefox-xvfb]
+commands = xvfb-run --auto-servernum --server-args='-screen 0 1024x768x24' {[testenv:firefox]commands}

chore: automatically build binary wheels for Linux, macOS, Windows