Merge pull request #187 from evelynmitchell/master
commit
6cb371f44a
@ -1,2 +1,2 @@
|
|||||||
[flake8]
|
[flake8]
|
||||||
extend-ignore = E501, W292, W291
|
extend-ignore = E501, W292, W291, W293
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
|
---
|
||||||
# These are supported funding model platforms
|
# These are supported funding model platforms
|
||||||
|
|
||||||
github: [kyegomez]
|
github: [kyegomez]
|
||||||
patreon: # Replace with a single Patreon username
|
# patreon: # Replace with a single Patreon username
|
||||||
open_collective: # Replace with a single Open Collective username
|
# open_collective: # Replace with a single Open Collective username
|
||||||
ko_fi: # Replace with a single Ko-fi username
|
# ko_fi: # Replace with a single Ko-fi username
|
||||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
# tidelift: # Replace with a single Tidelift platform-name/package-name
|
||||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
# community_bridge: # Replace with a single Community Bridge project-name
|
||||||
liberapay: # Replace with a single Liberapay username
|
# liberapay: # Replace with a single Liberapay username
|
||||||
issuehunt: # Replace with a single IssueHunt username
|
# issuehunt: # Replace with a single IssueHunt username
|
||||||
otechie: # Replace with a single Otechie username
|
# otechie: # Replace with a single Otechie username
|
||||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
# lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name
|
||||||
custom: #Nothing
|
# custom: #Nothing
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
|
---
|
||||||
# this is a config file for the github action labeler
|
# this is a config file for the github action labeler
|
||||||
|
|
||||||
# Add 'label1' to any changes within 'example' folder or any subfolders
|
# Add 'label1' to any changes within 'example' folder or any subfolders
|
||||||
example_change:
|
example_change:
|
||||||
- example/**
|
- example/**
|
||||||
|
|
||||||
# Add 'label2' to any file changes within 'example2' folder
|
# Add 'label2' to any file changes within 'example2' folder
|
||||||
example2_change: example2/*
|
example2_change: example2/*
|
||||||
|
|
||||||
# Add label3 to any change to .txt files within the entire repository. Quotation marks are required for the leading asterisk
|
# Add label3 to any change to .txt files within the entire repository.
|
||||||
|
# Quotation marks are required for the leading asterisk
|
||||||
text_files:
|
text_files:
|
||||||
- '**/*.txt'
|
- '**/*.txt'
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
name: Linting and Formatting
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint_and_format:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: 3.x
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pip install -r requirements.txt
|
|
||||||
|
|
||||||
- name: Find Python files
|
|
||||||
run: find swarms -name "*.py" -type f -exec autopep8 --in-place --aggressive --aggressive {} +
|
|
||||||
|
|
||||||
- name: Push changes
|
|
||||||
uses: ad-m/github-push-action@master
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -1,42 +0,0 @@
|
|||||||
name: Continuous Integration
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: 3.x
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pip install -r requirements.txt
|
|
||||||
|
|
||||||
- name: Run unit tests
|
|
||||||
run: pytest tests/unit
|
|
||||||
|
|
||||||
- name: Run integration tests
|
|
||||||
run: pytest tests/integration
|
|
||||||
|
|
||||||
- name: Run code coverage
|
|
||||||
run: pytest --cov=swarms tests/
|
|
||||||
|
|
||||||
- name: Run linters
|
|
||||||
run: pylint swarms
|
|
||||||
|
|
||||||
- name: Build documentation
|
|
||||||
run: make docs
|
|
||||||
|
|
||||||
- name: Validate documentation
|
|
||||||
run: sphinx-build -b linkcheck docs build/docs
|
|
||||||
|
|
||||||
- name: Run performance tests
|
|
||||||
run: find ./tests -name '*.py' -exec pytest {} \;
|
|
@ -1,28 +0,0 @@
|
|||||||
name: Documentation Tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: 3.x
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pip install -r requirements.txt
|
|
||||||
|
|
||||||
- name: Build documentation
|
|
||||||
run: make docs
|
|
||||||
|
|
||||||
- name: Validate documentation
|
|
||||||
run: sphinx-build -b linkcheck docs build/docs
|
|
@ -1,66 +0,0 @@
|
|||||||
# This workflow uses actions that are not certified by GitHub.
|
|
||||||
# They are provided by a third-party and are governed by
|
|
||||||
# separate terms of service, privacy policy, and support
|
|
||||||
# documentation.
|
|
||||||
|
|
||||||
# This workflow lets you generate SLSA provenance file for your project.
|
|
||||||
# The generation satisfies level 3 for the provenance requirements - see https://slsa.dev/spec/v0.1/requirements
|
|
||||||
# The project is an initiative of the OpenSSF (openssf.org) and is developed at
|
|
||||||
# https://github.com/slsa-framework/slsa-github-generator.
|
|
||||||
# The provenance file can be verified using https://github.com/slsa-framework/slsa-verifier.
|
|
||||||
# For more information about SLSA and how it improves the supply-chain, visit slsa.dev.
|
|
||||||
|
|
||||||
name: SLSA generic generator
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
release:
|
|
||||||
types: [created]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
digests: ${{ steps.hash.outputs.digests }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
# ========================================================
|
|
||||||
#
|
|
||||||
# Step 1: Build your artifacts.
|
|
||||||
#
|
|
||||||
# ========================================================
|
|
||||||
- name: Build artifacts
|
|
||||||
run: |
|
|
||||||
# These are some amazing artifacts.
|
|
||||||
echo "artifact1" > artifact1
|
|
||||||
echo "artifact2" > artifact2
|
|
||||||
|
|
||||||
# ========================================================
|
|
||||||
#
|
|
||||||
# Step 2: Add a step to generate the provenance subjects
|
|
||||||
# as shown below. Update the sha256 sum arguments
|
|
||||||
# to include all binaries that you generate
|
|
||||||
# provenance for.
|
|
||||||
#
|
|
||||||
# ========================================================
|
|
||||||
- name: Generate subject for provenance
|
|
||||||
id: hash
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
# List the artifacts the provenance will refer to.
|
|
||||||
files=$(ls artifact*)
|
|
||||||
# Generate the subjects (base64 encoded).
|
|
||||||
echo "hashes=$(sha256sum $files | base64 -w0)" >> "${GITHUB_OUTPUT}"
|
|
||||||
|
|
||||||
provenance:
|
|
||||||
needs: [build]
|
|
||||||
permissions:
|
|
||||||
actions: read # To read the workflow path.
|
|
||||||
id-token: write # To sign the provenance.
|
|
||||||
contents: write # To add assets to a release.
|
|
||||||
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.4.0
|
|
||||||
with:
|
|
||||||
base64-subjects: "${{ needs.build.outputs.digests }}"
|
|
||||||
upload-assets: true # Optional: Upload to a new release
|
|
@ -1,19 +1,29 @@
|
|||||||
|
---
|
||||||
# This is a basic workflow to help you get started with Actions
|
# This is a basic workflow to help you get started with Actions
|
||||||
|
|
||||||
name: Lint
|
name: Lint
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request] # yamllint disable-line rule:truthy
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
yaml-lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out source repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: yaml Lint
|
||||||
|
uses: ibiqlik/action-yamllint@v3
|
||||||
flake8-lint:
|
flake8-lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Lint
|
name: flake8 Lint
|
||||||
steps:
|
steps:
|
||||||
- name: Check out source repository
|
- name: Check out source repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Set up Python environment
|
- name: Set up Python environment
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: "3.11"
|
|
||||||
- name: flake8 Lint
|
|
||||||
uses: py-actions/flake8@v2
|
uses: py-actions/flake8@v2
|
||||||
|
ruff-lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: ruff Lint
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: chartboost/ruff-action@v1
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
name: Linting
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: 3.x
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pip install -r requirements.txt
|
|
||||||
|
|
||||||
- name: Run linters
|
|
||||||
run: pylint swarms
|
|
@ -1,27 +0,0 @@
|
|||||||
name: Makefile CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "master" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "master" ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: configure
|
|
||||||
run: ./configure
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: make
|
|
||||||
|
|
||||||
- name: Run check
|
|
||||||
run: make check
|
|
||||||
|
|
||||||
- name: Run distcheck
|
|
||||||
run: make distcheck
|
|
@ -1,23 +0,0 @@
|
|||||||
name: Pylint
|
|
||||||
|
|
||||||
on: [push]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
python-version: ["3.8", "3.9", "3.10"]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install pylint
|
|
||||||
- name: Analysing the code with pylint
|
|
||||||
run: |
|
|
||||||
pylint $(git ls-files '*.py')
|
|
@ -1,39 +0,0 @@
|
|||||||
# This workflow will install Python dependencies, run tests and lint with a single version of Python
|
|
||||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
|
||||||
|
|
||||||
name: Python application
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "master" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "master" ]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Set up Python 3.10
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: "3.10"
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install flake8 pytest
|
|
||||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
||||||
- name: Lint with flake8
|
|
||||||
run: |
|
|
||||||
# stop the build if there are Python syntax errors or undefined names
|
|
||||||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
|
||||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
|
||||||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
|
||||||
- name: Test with pytest
|
|
||||||
run: |
|
|
||||||
pytest
|
|
@ -1,23 +0,0 @@
|
|||||||
name: Quality
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "master" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "master" ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- name: Checkout actions
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Init environment
|
|
||||||
uses: ./.github/actions/init-environment
|
|
||||||
- name: Run linter
|
|
||||||
run: |
|
|
||||||
pylint `git diff --name-only --diff-filter=d origin/master HEAD | grep -E '\.py$' | tr '\n' ' '`
|
|
@ -1,8 +0,0 @@
|
|||||||
name: Ruff
|
|
||||||
on: [ push, pull_request ]
|
|
||||||
jobs:
|
|
||||||
ruff:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: chartboost/ruff-action@v1
|
|
@ -1,23 +0,0 @@
|
|||||||
name: Python application test
|
|
||||||
|
|
||||||
on: [push]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Set up Python 3.8
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: 3.8
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install pytest
|
|
||||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
||||||
- name: Run tests with pytest
|
|
||||||
run: |
|
|
||||||
find tests/ -name "*.py" | xargs pytest
|
|
@ -0,0 +1,4 @@
|
|||||||
|
rules:
|
||||||
|
line-length:
|
||||||
|
level: warning
|
||||||
|
allow-non-breakable-inline-mappings: true
|
Loading…
Reference in new issue