Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rerun GitHub Actions on push events to master; update dev documentation to mention a weird thing with JS tests #468

Merged
merged 3 commits into from
Dec 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 13 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ npm install -g qunit-puppeteer jshint [email protected]

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

Expand All @@ -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.)
Comment on lines +38 to +41
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we should also include a note about issue 435 that causes the legend test to fail if you load tests/index.html into a firefox browser?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense. Just added a note.


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
Expand Down