Repository navigation
Docs build, CI consolidation, README update #509
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
| # Tests. Branch protection on master requires the job named "build"; keep that name. | |
| name: BindsNET build status | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| POETRY_VERSION: "2.4.3" | |
| jobs: | |
| build: | |
| name: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install Poetry | |
| run: pipx install "poetry==${POETRY_VERSION}" | |
| - uses: actions/setup-python@v7 | |
| with: | |
| python-version: "3.13" | |
| cache: poetry | |
| - name: Install dependencies | |
| run: poetry install | |
| - name: Lint with flake8 (syntax errors and undefined names) | |
| run: pipx run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
| - name: Test with pytest | |
| run: poetry run pytest | |
| # The other supported Python versions (pyproject.toml: >=3.11,<3.14). | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install Poetry | |
| run: pipx install "poetry==${POETRY_VERSION}" | |
| - uses: actions/setup-python@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: poetry | |
| - name: Install dependencies | |
| run: poetry install | |
| - name: Test with pytest | |
| run: poetry run pytest |