Merge pull request #242 from sandialabs/dependabot/github_actions/git… #512
This file contains hidden or 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
| 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.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2 | |
| with: | |
| egress-policy: audit | |
| - name: Check out the commit | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Set up Python | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.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@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 | |
| 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@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 | |
| 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@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| 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@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2 | |
| with: | |
| egress-policy: audit | |
| - name: Conventional Commits | |
| uses: taskmedia/action-conventional-commits@851d8b8685588ffa1cf390ade7f126116020d844 # v1.1.23 | |
| with: | |
| types: > | |
| build|chore|ci|docs|feat|fix|minor|patch|perf|style|refactor|test |