Agent refactoring and saving #101
This file contains 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
name: test | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- master | |
- test-github-actions | |
pull_request: | |
jobs: | |
test: | |
name: test | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.11"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
id: setup-python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.5.1 | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v4 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root --with test,dev,docs | |
- name: Install project | |
run: poetry install --no-interaction --with test,dev,docs | |
- name: Verify Git installation | |
run: git --version | |
- name: Verify pre-commit installation | |
run: poetry run pre-commit --version | |
- name: Run pre-commit hooks | |
run: | | |
poetry run pre-commit install | |
poetry run pre-commit run --all-files | |
- name: Run tests | |
run: poetry run pytest | |
env: | |
PYTHONPATH: ${{ github.workspace }} |