Merge pull request #2 from thomasZen/main #1
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: 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" | |