Refact2 #422
Workflow file for this run
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: Run pytest | |
on: | |
# Triggers the workflow on push or pull request events but only for the "develop" and "master" branch | |
push: | |
branches: [ "develop" , "master"] | |
pull_request: | |
branches: [ "develop" , "master"] | |
jobs: | |
pytest: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout repository | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# Setup Python | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
# install package | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python setup.py install | |
# install pytest | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest | |
# pytest -> JUnit xml | |
- name: PyTest | |
run: | | |
python -m pytest tests/unittests --junit-xml results/pytest.xml | |
continue-on-error: true | |
# show the results | |
- name: Upload Unit Test Results | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Unit Test Results (Python 3.10) | |
path: results/*.xml | |
- name: Download Artifacts | |
if: success() || failure() | |
uses: actions/download-artifact@v2 | |
with: | |
path: artifacts | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v1 | |
with: | |
files: artifacts/**/*.xml | |