Skip to content

Merge pull request #148 from sandialabs/dependabot/github_actions/git… #297

Merge pull request #148 from sandialabs/dependabot/github_actions/git…

Merge pull request #148 from sandialabs/dependabot/github_actions/git… #297

name: Continuous Integration
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
defaults:
run:
shell: bash
permissions:
contents: read
jobs:
test:
runs-on: macos-latest
strategy:
matrix:
version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- name: Check out the commit
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
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
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
with:
timeout_minutes: 10
max_attempts: 3
command: python3 -m pytest --verbose --cov=shell_logger test/
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@5c47607acb93fed5485fdbf7232e8a31425f672a # v5.0.2
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Check documentation coverage
run: |
make coverage SPHINXOPTS="-W --keep-going"
mv build/coverage/python.txt ../docs-coverage-report-${{ matrix.version }}.txt
working-directory: ./doc
- name: Archive documentation coverage results
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: docs-coverage-report-${{ matrix.version }}
path: docs-coverage-report-${{ matrix.version }}.txt
- name: Test uninstall
run: python3 -m pip uninstall -y shell-logger
commits:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- name: Conventional Commits
uses: taskmedia/action-conventional-commits@cb0de258e7309e163ee353a8c38e24e609608cd6 # v1.1.19
with:
types: >
build|chore|ci|docs|feat|fix|minor|patch|perf|style|refactor|test