Add on-device NaN debugging and unify StatefulFunction cache (#139) #695
This file contains hidden or 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
| # This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: Continuous Integration | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: read # to fetch code | |
| actions: write # to cancel previous workflows | |
| # This prevents duplicate runs: when a PR exists, only the PR event runs | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test_linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ "3.13" ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Print concurrency group | |
| run: echo '${{ github.workflow }}-${{ github.ref }}' | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip cache purge | |
| python -m pip install --upgrade pip build --no-cache-dir | |
| python -m pip install -r requirements-dev.txt --no-cache-dir | |
| pip install . --no-cache-dir | |
| - name: Test with pytest | |
| run: | | |
| pytest brainstate/ | |
| test_macos: | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ "3.13" ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Print concurrency group | |
| run: echo '${{ github.workflow }}-${{ github.ref }}' | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip cache purge | |
| python -m pip install --upgrade pip build --no-cache-dir | |
| python -m pip install -r requirements-dev.txt --no-cache-dir | |
| pip install . --no-cache-dir | |
| - name: Test with pytest | |
| run: | | |
| pytest brainstate/ | |
| test_windows: | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ "3.13" ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Print concurrency group | |
| run: echo '${{ github.workflow }}-${{ github.ref }}' | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip cache purge | |
| python -m pip install --upgrade pip build --no-cache-dir | |
| python -m pip install -r requirements-dev.txt --no-cache-dir | |
| pip install . --no-cache-dir | |
| - name: Test with pytest | |
| run: | | |
| pytest brainstate/ -p no:faulthandler |