Skip to content

Commit 051df6b

Browse files
authored
Add CI/CD workflows with tox and GitHub Actions for comprehensive testing, 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.
1 parent 361f7c6 commit 051df6b

File tree

10 files changed

+509
-210
lines changed

10 files changed

+509
-210
lines changed

.github/workflows/code-quality.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/development.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Development
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '**'
7+
8+
jobs:
9+
unit-tests:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python:
14+
- "3.12"
15+
- "3.8"
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: ${{ matrix.python }}
22+
- name: Install dependencies
23+
run: pip install tox
24+
- name: Run unit tests
25+
run: tox -e test-unit -- -m "smoke or sanity"
26+
27+
integration-tests:
28+
runs-on: ubuntu-latest
29+
strategy:
30+
matrix:
31+
python:
32+
- "3.12"
33+
- "3.8"
34+
steps:
35+
- uses: actions/checkout@v4
36+
- name: Set up Python
37+
uses: actions/setup-python@v5
38+
with:
39+
python-version: ${{ matrix.python }}
40+
- name: Install dependencies
41+
run: pip install tox
42+
- name: Run integration tests
43+
run: tox -e test-integration -- -m smoke

.github/workflows/nightly.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Nightly
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *' # Runs at midnight every night
6+
7+
jobs:
8+
unit-tests:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python:
13+
- "3.12"
14+
- "3.11"
15+
- "3.10"
16+
- "3.9"
17+
- "3.8"
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python }}
24+
- name: Install dependencies
25+
run: pip install tox
26+
- name: Run unit tests
27+
run: tox -e test-unit -- --cov-report=term-missing --cov --cov-fail-under=75
28+
29+
integration-tests:
30+
runs-on: ubuntu-latest
31+
strategy:
32+
matrix:
33+
python:
34+
- "3.12"
35+
- "3.11"
36+
- "3.10"
37+
- "3.9"
38+
- "3.8"
39+
steps:
40+
- uses: actions/checkout@v4
41+
- name: Set up Python
42+
uses: actions/setup-python@v5
43+
with:
44+
python-version: ${{ matrix.python }}
45+
- name: Install dependencies
46+
run: pip install tox
47+
- name: Run integration tests
48+
run: tox -e test-integration -- -m "smoke or sanity"
49+
50+
e2e-tests:
51+
runs-on: ubuntu-latest
52+
strategy:
53+
matrix:
54+
python:
55+
- "3.12"
56+
- "3.11"
57+
- "3.10"
58+
- "3.9"
59+
- "3.8"
60+
steps:
61+
- uses: actions/checkout@v4
62+
- name: Set up Python
63+
uses: actions/setup-python@v5
64+
with:
65+
python-version: ${{ matrix.python }}
66+
- name: Install dependencies
67+
run: pip install tox
68+
- name: Run e2e tests
69+
run: tox -e test-e2e -- -m smoke

.github/workflows/quality.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Quality
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- '**'
10+
11+
jobs:
12+
quality-check:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python:
17+
- "3.12"
18+
- "3.8"
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python }}
25+
- name: Install dependencies
26+
run: pip install tox
27+
- name: Run quality checks
28+
run: tox -e quality
29+
30+
type-check:
31+
runs-on: ubuntu-latest
32+
strategy:
33+
matrix:
34+
python:
35+
- "3.12"
36+
- "3.8"
37+
steps:
38+
- uses: actions/checkout@v4
39+
- name: Set up Python
40+
uses: actions/setup-python@v5
41+
with:
42+
python-version: ${{ matrix.python }}
43+
- name: Install dependencies
44+
run: pip install tox
45+
- name: Run type checks
46+
run: tox -e types

.github/workflows/release.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- release/**
7+
8+
jobs:
9+
unit-tests:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python:
14+
- "3.12"
15+
- "3.11"
16+
- "3.10"
17+
- "3.9"
18+
- "3.8"
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python }}
25+
- name: Install dependencies
26+
run: pip install tox
27+
- name: Run unit tests
28+
run: tox -e test-unit -- --cov-report=term-missing --cov --cov-fail-under=75
29+
30+
integration-tests:
31+
runs-on: ubuntu-latest
32+
strategy:
33+
matrix:
34+
python:
35+
- "3.12"
36+
- "3.11"
37+
- "3.10"
38+
- "3.9"
39+
- "3.8"
40+
steps:
41+
- uses: actions/checkout@v4
42+
- name: Set up Python
43+
uses: actions/setup-python@v5
44+
with:
45+
python-version: ${{ matrix.python }}
46+
- name: Install dependencies
47+
run: pip install tox
48+
- name: Run integration tests
49+
run: tox -e test-integration -- --cov-report=term-missing --cov --cov-fail-under=75
50+
51+
e2e-tests:
52+
runs-on: ubuntu-latest
53+
strategy:
54+
matrix:
55+
python:
56+
- "3.12"
57+
- "3.11"
58+
- "3.10"
59+
- "3.9"
60+
- "3.8"
61+
steps:
62+
- uses: actions/checkout@v4
63+
- name: Set up Python
64+
uses: actions/setup-python@v5
65+
with:
66+
python-version: ${{ matrix.python }}
67+
- name: Install dependencies
68+
run: pip install tox
69+
- name: Run e2e tests
70+
run: tox -e test-e2e -- --cov-report=term-missing --cov --cov-fail-under=75

0 commit comments

Comments
 (0)