mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-28 08:28:00 -05:00
Update all classic CI workflows to use the single consolidated pyproject.toml at classic/ instead of individual project directories. Changes: - classic-autogpt-ci.yml: Run from classic/, update cache key and test paths - classic-forge-ci.yml: Run from classic/, update cache key and test paths - classic-benchmark-ci.yml: Run from classic/, use direct-benchmark command - classic-python-checks.yml: Simplify to single job (no matrix needed) - classic-autogpts-ci.yml: Update to use direct-benchmark for smoke tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
111 lines
2.9 KiB
YAML
111 lines
2.9 KiB
YAML
name: Classic - Python checks
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, dev, ci-test* ]
|
|
paths:
|
|
- '.github/workflows/classic-python-checks-ci.yml'
|
|
- 'classic/original_autogpt/**'
|
|
- 'classic/forge/**'
|
|
- 'classic/direct_benchmark/**'
|
|
- 'classic/pyproject.toml'
|
|
- 'classic/poetry.lock'
|
|
- '**.py'
|
|
- '!classic/forge/tests/vcr_cassettes'
|
|
pull_request:
|
|
branches: [ master, dev, release-* ]
|
|
paths:
|
|
- '.github/workflows/classic-python-checks-ci.yml'
|
|
- 'classic/original_autogpt/**'
|
|
- 'classic/forge/**'
|
|
- 'classic/direct_benchmark/**'
|
|
- 'classic/pyproject.toml'
|
|
- 'classic/poetry.lock'
|
|
- '**.py'
|
|
- '!classic/forge/tests/vcr_cassettes'
|
|
|
|
concurrency:
|
|
group: ${{ format('classic-python-checks-ci-{0}', github.head_ref && format('{0}-{1}', github.event_name, github.event.pull_request.number) || github.sha) }}
|
|
cancel-in-progress: ${{ startsWith(github.event_name, 'pull_request') }}
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: classic
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
min-python-version: "3.12"
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python ${{ env.min-python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ env.min-python-version }}
|
|
|
|
- name: Set up Python dependency cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.cache/pypoetry
|
|
key: ${{ runner.os }}-poetry-${{ hashFiles('classic/poetry.lock') }}
|
|
|
|
- name: Install Poetry
|
|
run: curl -sSL https://install.python-poetry.org | python3 -
|
|
|
|
- name: Install Python dependencies
|
|
run: poetry install
|
|
|
|
# Lint
|
|
|
|
- name: Lint (isort)
|
|
run: poetry run isort --check .
|
|
|
|
- name: Lint (Black)
|
|
if: success() || failure()
|
|
run: poetry run black --check .
|
|
|
|
- name: Lint (Flake8)
|
|
if: success() || failure()
|
|
run: poetry run flake8 .
|
|
|
|
types:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
min-python-version: "3.12"
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python ${{ env.min-python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ env.min-python-version }}
|
|
|
|
- name: Set up Python dependency cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.cache/pypoetry
|
|
key: ${{ runner.os }}-poetry-${{ hashFiles('classic/poetry.lock') }}
|
|
|
|
- name: Install Poetry
|
|
run: curl -sSL https://install.python-poetry.org | python3 -
|
|
|
|
- name: Install Python dependencies
|
|
run: poetry install
|
|
|
|
# Typecheck
|
|
|
|
- name: Typecheck
|
|
if: success() || failure()
|
|
run: poetry run pyright
|