From ad52e3e4b493093086b7c8c34d50b11672daf930 Mon Sep 17 00:00:00 2001 From: Kye Date: Fri, 6 Oct 2023 19:20:02 -0400 Subject: [PATCH] workflows Former-commit-id: 0ab2d9108d001d46ff500a06cf10bcb5fb85e519 --- .github/workflows/cos_integration.yml | 42 +++++++++++++++++++++++++ .github/workflows/docs_test.yml | 28 +++++++++++++++++ .github/workflows/lints.yml | 25 +++++++++++++++ .github/workflows/pr_request_checks.yml | 27 ++++++++++++++++ .github/workflows/testing.yml | 25 +++++++++++++++ 5 files changed, 147 insertions(+) create mode 100644 .github/workflows/cos_integration.yml create mode 100644 .github/workflows/docs_test.yml create mode 100644 .github/workflows/lints.yml create mode 100644 .github/workflows/pr_request_checks.yml create mode 100644 .github/workflows/testing.yml diff --git a/.github/workflows/cos_integration.yml b/.github/workflows/cos_integration.yml new file mode 100644 index 00000000..abae70b2 --- /dev/null +++ b/.github/workflows/cos_integration.yml @@ -0,0 +1,42 @@ +name: Continuous Integration + +on: + push: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + 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: pytest tests/performance \ No newline at end of file diff --git a/.github/workflows/docs_test.yml b/.github/workflows/docs_test.yml new file mode 100644 index 00000000..c7b1ce6e --- /dev/null +++ b/.github/workflows/docs_test.yml @@ -0,0 +1,28 @@ +name: Documentation Tests + +on: + push: + branches: + - master + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v3 + 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 \ No newline at end of file diff --git a/.github/workflows/lints.yml b/.github/workflows/lints.yml new file mode 100644 index 00000000..b61e471c --- /dev/null +++ b/.github/workflows/lints.yml @@ -0,0 +1,25 @@ +name: Linting + +on: + push: + branches: + - master + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: 3.x + + - name: Install dependencies + run: pip install -r requirements.txt + + - name: Run linters + run: pylint swarms \ No newline at end of file diff --git a/.github/workflows/pr_request_checks.yml b/.github/workflows/pr_request_checks.yml new file mode 100644 index 00000000..f6ca90ec --- /dev/null +++ b/.github/workflows/pr_request_checks.yml @@ -0,0 +1,27 @@ +name: Pull Request Checks + +on: + pull_request: + branches: + - master + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.x + + - name: Install dependencies + run: pip install -r requirements.txt + + - name: Run tests and checks + run: | + pytest tests/unit + pylint swarms \ No newline at end of file diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml new file mode 100644 index 00000000..d6a40768 --- /dev/null +++ b/.github/workflows/testing.yml @@ -0,0 +1,25 @@ +name: Unit Tests + +on: + push: + branches: + - master + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: 3.x + + - name: Install dependencies + run: pip install -r requirements.txt + + - name: Run unit tests + run: pytest tests/ \ No newline at end of file