Merge pull request #51 from sivonxay/main #94
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: Code Testing | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
main | |
push: | |
branches: | |
main | |
jobs: | |
pytest: | |
if: github.repository == 'BlauGroup/NanoParticleTools' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: ['3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Setup dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e .[full,test] | |
pip install pytest-cov | |
- name: Run tests | |
run: | | |
python -m pytest --cov=src --cov-report=xml | |
shell: | |
bash | |
- name: Upload coverage to CodeCov | |
uses: codecov/codecov-action@v3 |