Merge pull request #1 from Mustardburger/final #19
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: pytest | |
on: | |
push: | |
branches: | |
- master | |
- add-pytorch-dataloader-test | |
- clean-code | |
- final | |
pull_request: | |
branches: | |
- master | |
- add-pytorch-dataloader-test | |
- clean-code | |
- final | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python-version: ["3.8.17"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
# Install main dependencies | |
python -m pip install --upgrade pip | |
pip install pytest ruff # ruff only works with >3.7 | |
# Install CellBox from current repo | |
# pip install -e cellbox | |
# python cellbox/setup.py install | |
cd cellbox | |
pip install . | |
cd ../ | |
# Other dependencies | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
#- name: Lint with ruff (only Python 3.7+) | |
# # Run if not on master | |
# if: github.ref != 'refs/heads/master' | |
# run: | | |
# # stop the build if there are Python syntax errors or undefined names | |
# ruff --format=github --select=E9,F63,F7,F82 --target-version=py37 . | |
# # default set of ruff rules with GitHub Annotations | |
# ruff --format=github --target-version=py37 . | |
- name: Test with pytest | |
run: | | |
pytest test.py |