Skip to content

Merge pull request #209 from sandialabs/dependabot/github_actions/git… #380

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

Merge pull request #209 from sandialabs/dependabot/github_actions/git… #380

name: Continuous Integration
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
defaults:
run:
shell: bash
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Check out the commit
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Set up Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: ~${{ matrix.version }}
- name: Install development dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install \
-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=reverse_argparse example/ test/
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Check documentation spelling
run: make spelling
working-directory: ./doc
- name: Check documentation coverage
run: |
make coverage
mv build/coverage/python.txt ../docs-coverage-report-${{ matrix.version }}.txt
working-directory: ./doc
- name: Archive documentation coverage results
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: docs-coverage-report-${{ matrix.version }}
path: docs-coverage-report-${{ matrix.version }}.txt
- name: Test uninstall
run: python3 -m pip uninstall -y reverse_argparse
commits:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Conventional Commits
uses: taskmedia/action-conventional-commits@180c46eb0f4380691dc9845e68b1ef36c05d57d7 # v1.1.18
with:
types: >
build|chore|ci|docs|feat|fix|minor|patch|perf|style|refactor|test