Dockerise testing for dev (#1093) #133
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Test Default Branch | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
cache: 'pip' # caching pip dependencies | |
- name: Install dependencies | |
run: | | |
# Do all the installations | |
python -m pip install --upgrade pip wheel setuptools | |
pip install .[testing] | |
# Print out the pip versions for debugging | |
pip list | |
- name: Test with pytest | |
run: | | |
# Include notebook tests | |
rm -rf .coverage.* | |
export TEST_NOTEBOOKS=y | |
pytest --junitxml=junit/test-results.xml --cov-report=xml tests | |
- name: Upload pytest test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pytest-results | |
path: junit/test-results.xml | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} |