Skip to content

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

Enhance examples with additional features and improvements, including…

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

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 }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Cache Poetry dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
venv-${{ runner.os }}-${{ matrix.python-version }}-
- 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"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Cache Poetry dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-3.14-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
venv-${{ runner.os }}-3.14-
- 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