🚀 ChemInformant v2.4.0 - Core get_properties() Enhancement
#190
Workflow file for this run
This file contains hidden or 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: Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ".[dev,plot]" pytest-cov coverage-badge | |
| - name: Verify plotting libraries | |
| run: | | |
| python - <<'PY' | |
| import sys, matplotlib | |
| from PIL import __version__ as PILVER | |
| print("Python", sys.version.split()[0]) | |
| print("Pillow", PILVER) | |
| print("matplotlib", matplotlib.__version__) | |
| PY | |
| - name: Run tests with coverage | |
| env: | |
| PYTHONPATH: ${{ github.workspace }}/src | |
| run: pytest --cov=src/ChemInformant --cov-report=xml -v tests/ | |
| - name: Generate coverage badge | |
| run: coverage-badge -o coverage.svg -f | |
| - name: Deploy badge to gh-pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: . | |
| publish_branch: gh-pages | |
| keep_files: true | |
| allow_empty_commit: false | |
| commit_message: "Update coverage badge [skip ci]" |