Skip to content

Commit

Permalink
ci: Add continuous integration workflow
Browse files Browse the repository at this point in the history
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
jmgate committed Feb 29, 2024
1 parent c1da14d commit 0a59e3d
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/continuous-integration.yml
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

0 comments on commit 0a59e3d

Please sign in to comment.