diff --git a/.github/workflows/fix.yml b/.github/workflows/autofix.yml similarity index 96% rename from .github/workflows/fix.yml rename to .github/workflows/autofix.yml index efe15583..d5e2c3fa 100644 --- a/.github/workflows/fix.yml +++ b/.github/workflows/autofix.yml @@ -1,3 +1,5 @@ +name: autofix.ci + on: pull_request: push: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b4b08dc4..b66aa6c3 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,3 +18,9 @@ jobs: - run: pip install mkdocs-glightbox - run: pip install "mkdocstrings[python]" - run: mkdocs gh-deploy --force + preview: + runs-on: ubuntu-latest + steps: + - uses: readthedocs/actions/preview@v1 + with: + project-slug: swarms diff --git a/.github/workflows/pr_request_checks.yml b/.github/workflows/pr_request_checks.yml deleted file mode 100644 index bcd992e9..00000000 --- a/.github/workflows/pr_request_checks.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: Pull Request Checks -on: - pull_request: - branches: - - master -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.x - - name: Install dependencies - run: "pip install -r requirements.txt\npip install swarms\npip install pytest - \n" - - name: Run tests and checks - run: | - pytest - pylint swarms diff --git a/.github/workflows/pull-request-links.yml b/.github/workflows/pull-request-links.yml deleted file mode 100644 index b801a86d..00000000 --- a/.github/workflows/pull-request-links.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: readthedocs/actions -on: - pull_request_target: - types: - - opened - paths: - - "docs/**" -permissions: - pull-requests: write -jobs: - pull-request-links: - runs-on: ubuntu-latest - steps: - - uses: readthedocs/actions/preview@v1 - with: - project-slug: swarms diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml deleted file mode 100644 index b4e54559..00000000 --- a/.github/workflows/python-publish.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: Upload Python Package -on: # yamllint disable-line rule:truthy - release: - types: [published] -permissions: - contents: read -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build - - name: Build package - run: python -m build - - name: Publish package - uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/run_examples.yml b/.github/workflows/run_examples.yml deleted file mode 100644 index 685c84c4..00000000 --- a/.github/workflows/run_examples.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -name: Run Examples Script -on: - push: - branches: [main] - pull_request: - branches: [main] - schedule: - # Runs at 3:00 AM UTC every day - - cron: "0 3 * * *" -jobs: - run-examples: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install Python - uses: actions/setup-python@v4 - - name: Install Poetry - uses: snok/install-poetry@v1 - - name: Setup a local virtual environment - run: | - poetry config virtualenvs.create true --local - poetry config virtualenvs.in-project true --local - - uses: actions/cache@v3 - name: Define a cache for the virtual environment - file - with: - path: ./.venv - key: venv-${{ hashFiles('poetry.lock') }} - - name: Install the project dependencies - run: poetry install - - name: Install OpenCV - run: sudo apt-get install python3-opencv - - name: Enter the virtual environment - run: source $VENV - - name: Make Script Executable and Run - run: |- - chmod +x ./scripts/run_examples.sh - ./scripts/run_examples.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9cfcd7d4..a57b7d22 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,3 +30,31 @@ jobs: run: source $VENV - name: Run the tests run: poetry run pytest --verbose + run-examples: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Python + uses: actions/setup-python@v4 + - name: Install Poetry + uses: snok/install-poetry@v1 + - name: Setup a local virtual environment + run: | + poetry config virtualenvs.create true --local + poetry config virtualenvs.in-project true --local + - uses: actions/cache@v3 + name: Define a cache for the virtual environment + file + with: + path: ./.venv + key: venv-${{ hashFiles('poetry.lock') }} + - name: Install the project dependencies + run: poetry install + - name: Install OpenCV + run: sudo apt-get install python3-opencv + - name: Enter the virtual environment + run: source $VENV + - name: Make Script Executable and Run + run: |- + chmod +x ./scripts/run_examples.sh + ./scripts/run_examples.sh