diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 21ce58748..afcfeb89d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,9 +2,12 @@ name: Empress CI # Controls when the action will run. on: - # Triggers the workflow on pull request events but only on the master branch + # Triggers the workflow on pull request and push events, only on the master + # branch pull_request: branches: [ master ] + push: + branches: [ master ] jobs: # name of job diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 95cb8672c..35815b52e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,8 +17,8 @@ npm install -g qunit-puppeteer jshint prettier@2.0.5 If you don't have `npm` installed, you will need to install that first. -**Note**: if you can't install puppeteer, the test suite can be run using a -web browser by opening the page in `tests/index.html`. +**Note**: if you can't install puppeteer, the (JavaScript) test suite can be +run using a web browser by opening the page in `tests/index.html`. ## Running tests @@ -34,6 +34,17 @@ make test If you just want to run the Python or JavaScript tests, you can run `make pytest` or `make jstest` respectively. +### Notes about JavaScript tests +If you add HTML elements to EMPress' HTML code that the JavaScript code relies +on, you will also need to add these elements to the `tests/index.html` file. +Ideally this would not be necessary, but for now it is. (Failing to do this can +cause obscure error messages from the JS tests.) + +Also, loading the test `index.html` fails on Firefox for some of the `Legend` +tests: see https://github.com/biocore/empress/issues/435. To circumvent this, +if you need to load the tests in the browser (rather than using puppeteer), +we recommend using a different browser for the time being. + ## Front-end development For convenience, a utility script `./tests/python/make-dev-page.py` is bundled