-
Notifications
You must be signed in to change notification settings - Fork 350
62 lines (56 loc) · 1.58 KB
/
Copy pathpython-app.yml
File metadata and controls
62 lines (56 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# 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
.github/scripts/use_cpu_torch.sh "poetry run python"
- 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
.github/scripts/use_cpu_torch.sh "poetry run python"
- name: Test with pytest
run: poetry run pytest