Merge pull request #159 from Spin-Chemistry-Labs/158-cant-import-radi… #36
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 tests | |
on: push | |
jobs: | |
run-radicalpy-tests: | |
strategy: | |
matrix: | |
python: ["3.10", "3.11"] | |
os: [ubuntu-latest, windows-latest] | |
name: Run test for RadicalPy | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python ${{ matrix.python }} 🐍 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
cache: 'pip' | |
- name: Install packages 📦 | |
run: >- | |
python -m | |
pip install -r requirements.txt | |
- name: Run tests | |
run: >- | |
python -m | |
unittest | |
discover -v | |
- name: Run examples | |
if: runner.os == 'Linux' | |
# This is bash. | |
# Need a separate branch to iterate over files on Windows. | |
run: >- | |
for file in $(ls examples/*.py); do | |
echo "Running example: $file" | |
PYTHONPATH=. python $file --fast | |
done |