Skip to content

feat: update agent addresses #561

feat: update agent addresses

feat: update agent addresses #561

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
check-if-files-changed:
runs-on: ubuntu-latest
outputs:
uagents: ${{ steps.files-changed.outputs.uagents }}
steps:
- uses: dorny/paths-filter@v2
id: files-changed
with:
filters: |
uagents:
- 'python/**'
- '.github/**'
tests:
name: Tests
needs: check-if-files-changed
if: ${{ needs.check-if-files-changed.outputs.uagents == 'true' }}
defaults:
run:
shell: bash
working-directory: ./python
strategy:
matrix:
os: [ubuntu-latest]
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
include:
- os: macos-latest
python-version: "3.10.10"
- os: windows-latest
python-version: "3.10.10"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
version: 1.3.2
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
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
- run: poetry install --no-interaction
- name: Run tests
run: |
source $VENV
poetry run pytest
linting:
name: Lint & Formatting
needs: check-if-files-changed
if: ${{ needs.check-if-files-changed.outputs.uagents == 'true' }}
defaults:
run:
shell: bash
working-directory: ./python
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.10" ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
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
- run: poetry install --no-interaction
- run: poetry run black --check .
- run: poetry run pylint $(git ls-files '*.py')