Merge pull request #159 from Spin-Chemistry-Labs/158-cant-import-radi… #34
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: Coverage | |
on: push | |
jobs: | |
run-radicalpy-coverage: | |
name: Run coverage on RadicalPy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python "3.11" 🐍 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
cache: 'pip' | |
- name: Install packages 📦 | |
run: >- | |
python -m | |
pip install -r requirements.txt | |
- name: Install coverage | |
run: >- | |
python -m | |
pip install coverage | |
- name: Reset coverage | |
run: >- | |
coverage erase | |
- name: Run coverage | |
run: >- | |
coverage run -a -m | |
unittest | |
discover -v | |
- name: Run examples | |
run: >- | |
for file in $(ls examples/aniso*.py); do | |
PYTHONPATH=. coverage run -a $file --fast | |
done | |
- name: Create report | |
run: >- | |
coverage report && coverage xml && ls -lrt | |
- name: Code Coverage Report | |
uses: irongut/CodeCoverageSummary@v1.3.0 | |
with: | |
filename: coverage.xml |