You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
82 lines
1.7 KiB
82 lines
1.7 KiB
1 year ago
|
# Notebook-related checks
|
||
|
|
||
|
name: Presubmit checks
|
||
|
|
||
|
on:
|
||
|
# Relevant PRs
|
||
|
pull_request:
|
||
|
paths:
|
||
|
- "swarms/**"
|
||
|
- "tests/**"
|
||
|
# Allow manual runs
|
||
|
workflow_dispatch:
|
||
|
|
||
|
jobs:
|
||
|
test3_11:
|
||
|
name: Test Py3.11
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v3
|
||
|
- uses: actions/setup-python@v4
|
||
|
with:
|
||
|
python-version: '3.11'
|
||
|
- name: Run tests
|
||
|
run: |
|
||
|
python --version
|
||
|
pip install .[dev]
|
||
|
python -m pytest
|
||
|
test3_10:
|
||
|
name: Test Py3.10
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v3
|
||
|
- uses: actions/setup-python@v4
|
||
|
with:
|
||
|
python-version: '3.10'
|
||
|
- name: Run tests
|
||
|
run: |
|
||
|
python --version
|
||
|
pip install -q .[dev]
|
||
|
python -m pytest
|
||
|
test3_9:
|
||
|
name: Test Py3.9
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v3
|
||
|
- uses: actions/setup-python@v4
|
||
|
with:
|
||
|
python-version: '3.9'
|
||
|
- name: Run tests
|
||
|
run: |
|
||
|
python --version
|
||
|
pip install .[dev]
|
||
|
python -m pytest
|
||
|
pytype3_10:
|
||
|
name: pytype 3.10
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v3
|
||
|
- uses: actions/setup-python@v4
|
||
|
with:
|
||
|
python-version: '3.10'
|
||
|
- name: Run pytype
|
||
|
run: |
|
||
|
python --version
|
||
|
pip install .[dev]
|
||
|
pip install -q gspread ipython
|
||
|
pytype
|
||
|
format:
|
||
|
name: Check format with black
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v3
|
||
|
- uses: actions/setup-python@v4
|
||
|
with:
|
||
|
python-version: '3.11'
|
||
|
- name: Check format
|
||
|
run: |
|
||
|
python --version
|
||
|
pip install -q .
|
||
|
pip install -q black
|
||
|
black . --check
|