-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add continuous integration workflow
Create two jobs: * commits: Ensure we're adhering to the Conventional Commits specification. * test: Currently this job * Checks out the commit * Sets up a Python environment * Installs the requirements * Installs the package * Checks documentation spelling and coverage * Uninstalls the package Note that the unit test suite is not running yet, because it's not completely passing. That will be handled soon.
- Loading branch information
Showing
1 changed file
with
74 additions
and
0 deletions.
There are no files selected for viewing
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,74 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
steps: | ||
|
||
- name: Check out the commit | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ~${{ matrix.version }} | ||
|
||
- name: Install development dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install \ | ||
-r requirements.txt \ | ||
-r doc/requirements.txt \ | ||
-r example/requirements.txt \ | ||
-r test/requirements.txt | ||
- name: Test install | ||
run: python3 -m pip install . | ||
|
||
# - name: Test with pytest | ||
# run: python3 -m pytest --cov=shell_logger example/ test/ | ||
|
||
# - name: Upload coverage reports to Codecov | ||
# uses: codecov/codecov-action@v3 | ||
# env: | ||
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: Check documentation spelling | ||
run: make spelling | ||
working-directory: ./doc | ||
|
||
- name: Check documentation coverage | ||
run: make coverage | ||
working-directory: ./doc | ||
|
||
- name: Archive documentation coverage results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: docs-coverage-report | ||
path: doc/build/coverage/python.txt | ||
|
||
- name: Test uninstall | ||
run: python3 -m pip uninstall -y shell-logger | ||
|
||
commits: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Conventional Commits | ||
uses: taskmedia/[email protected] | ||
with: | ||
types: > | ||
build|chore|ci|docs|feat|fix|minor|patch|perf|style|refactor|test |