Skip to content

Enhance examples with additional features and improvements, including… #3

Enhance examples with additional features and improvements, including…

Enhance examples with additional features and improvements, including… #3

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.14"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
cache-dependency-path: 'poetry.lock'
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
run: |
echo "venv-path=$(poetry env info --path)" >> $GITHUB_OUTPUT
continue-on-error: true
- name: Install dependencies
run: poetry install --no-interaction --no-root
- name: Install project
run: poetry install --no-interaction
- name: Run tests
run: |
if [ -d "tests" ] && [ "$(ls -A tests/*.py 2>/dev/null)" ]; then
poetry add --group dev pytest || true
poetry run pytest tests/ -v
else
echo "No tests found, skipping test execution"
fi
- name: Check imports
run: poetry run python -c "import algo_utils_examples; import algo_utils_examples.accounts; import algo_utils_examples.transaction; import algo_utils_examples.assets; print('All imports successful')"
- name: Verify module structure
run: |
poetry run python -c "from algo_utils_examples.main import main; print('main() function imported successfully')"
echo "Module structure verified (execution requires LocalNet)"
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.14
uses: actions/setup-python@v5
with:
python-version: "3.14"
cache: 'poetry'
cache-dependency-path: 'poetry.lock'
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Install dependencies
run: poetry install --no-interaction
- name: Check code formatting with black (optional)
run: |
poetry add --group dev black || echo "black not available"
poetry run black --check src/ tests/ || echo "Formatting check skipped"
continue-on-error: true
- name: Lint with ruff (optional)
run: |
poetry add --group dev ruff || echo "ruff not available"
poetry run ruff check src/ tests/ || echo "Linting check skipped"
continue-on-error: true