-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI/CD workflows with tox and GitHub Actions for comprehensive tes…
…ting, styling, and quality checks (#16) ## Summary Implements a series of GitHub Actions workflows and tox environments to streamline the CI/CD processes for the project. It replaces the previous Makefile-based pathways and focuses on modernizing the development, testing, and deployment practices. ## Details - CI/CD Workflows: Introduced multiple GitHub Actions workflows for development, nightly builds, quality checks, and releases. - Development Workflow: Runs on pull requests to any branch. Includes unit tests and integration tests for Python versions 3.8 to 3.12. - Nightly Workflow: Scheduled to run nightly, ensuring continuous integration health with the unit, integration, and end-to-end tests. - Quality Workflow: This runs on pushes to the main branch and pull requests. It ensures code quality with linting, formatting, and type checking. - Release Workflow: Triggers on push to release branches, running comprehensive tests to prepare for new releases. - tox Configuration: Updated tox.ini to define environments for unit tests, integration tests, end-to-end tests, quality checks, style checks, type checks, build, and clean operations. - Developer Documentation: Expanded DEVELOPING.md to guide contributors in setting up the development environment, running tests, and maintaining code quality. - README Updates: Updated project documentation to reflect the new CI/CD practices and removed outdated Makefile instructions. ## Test Plan Pending running the new GitHub Actions workflows. If any issues pop up, those will be fixed either in this diff or in subsequent ones.
- Loading branch information
Showing
10 changed files
with
509 additions
and
210 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.