Skip to content

Commit

Permalink
Merge pull request #2 from thomasZen/main
Browse files Browse the repository at this point in the history
Add automatic test for example script
  • Loading branch information
MaxFBurg authored Jun 10, 2024
2 parents 03a0fc5 + d18cbc8 commit f7cc392
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Python Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [ "3.10" ]

steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: Run unit tests
run: |
pytest -v
- name: Test example script help message
run: |
./scripts/run_kmeans_example.py --help
- name: Test example script execution
run: |
./scripts/run_kmeans_example.py --num_clusters 5 --num_neurons 42 --device cpu --save_data_path "kmeans_test_results"
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ scikit-learn
nnfabrik @ git+https://github.com/sinzlab/nnfabrik.git@29f22bc95841897d734532c02b77423e602ba21f
neuralpredictors
neuro-mei
pytest

0 comments on commit f7cc392

Please sign in to comment.