Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI/CD workflows with tox and GitHub Actions for comprehensive testing, styling, and quality checks #16

Merged
merged 8 commits into from
Jul 24, 2024
39 changes: 0 additions & 39 deletions .github/workflows/code-quality.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Development

on:
pull_request:
branches:
- '**'

jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python:
- "3.12"
- "3.8"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox
- name: Run unit tests
run: tox -e test-unit -- -m "smoke or sanity"

integration-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python:
- "3.12"
- "3.8"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox
- name: Run integration tests
run: tox -e test-integration -- -m smoke
69 changes: 69 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Nightly

on:
schedule:
- cron: '0 0 * * *' # Runs at midnight every night

jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox
- name: Run unit tests
run: tox -e test-unit -- --cov-report=term-missing --cov --cov-fail-under=75

integration-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox
- name: Run integration tests
run: tox -e test-integration -- -m "smoke or sanity"

e2e-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox
- name: Run e2e tests
run: tox -e test-e2e -- -m smoke
46 changes: 46 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Quality

on:
push:
branches:
- main
pull_request:
branches:
- '**'

jobs:
quality-check:
runs-on: ubuntu-latest
strategy:
matrix:
python:
- "3.12"
- "3.8"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox
- name: Run quality checks
run: tox -e quality

type-check:
runs-on: ubuntu-latest
strategy:
matrix:
python:
- "3.12"
- "3.8"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox
- name: Run type checks
run: tox -e types
70 changes: 70 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Release

on:
push:
branches:
- release/**

jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox
- name: Run unit tests
run: tox -e test-unit -- --cov-report=term-missing --cov --cov-fail-under=75

integration-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox
- name: Run integration tests
run: tox -e test-integration -- --cov-report=term-missing --cov --cov-fail-under=75

e2e-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox
- name: Run e2e tests
run: tox -e test-e2e -- --cov-report=term-missing --cov --cov-fail-under=75
Loading