Skip to content

another try

another try #963

Workflow file for this run

name: Tests
on:
push: null
pull_request: null
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10' ]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install tox==3.28.0 tox-gh-actions
pip install jupyterlab==3.1
- name: Run tox
run: |
python -m tox -- --junit-xml pytest.xml
- name: Upload result_images from graphics tests
if: failure()
uses: actions/upload-artifact@v2
with:
name: Result images
path: result_images
- name: Upload test results
if: always()
uses: actions/upload-artifact@v2
with:
name: Test results (Python ${{ matrix.python-version }})
path: pytest.xml
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install tox==3.28.0 tox-gh-actions
pip install jupyterlab==3.1
- name: Run tox flake8
run: |
python -m tox -e flake8
publish-test-results:
name: "Publish test results"
needs: tests
runs-on: ubuntu-latest
# the build-and-test job might be skipped, we don't need to run this job then
if: (success() || failure()) && github.event_name == 'pull_request'
steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
path: artifacts
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
with:
files: artifacts/**/pytest.xml
coverage:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install tox==3.28.0 tox-gh-actions
pip install jupyterlab==3.1
- name: Run tox coverage env
run: |
python -m tox -e coverage > pytest-coverage.txt
- name: Comment coverage
uses: coroo/pytest-coverage-commentator@v1.0.2
with:
pytest-coverage: pytest-coverage.txt
# We want to execute this step even if the previous one had failed.
if: always()