Add auto-detecting Python testing framework GitHub Action #12
Workflow file for this run
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: Advanced Testing Example | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| python-version: ['3.9', '3.10', '3.11', '3.12'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Run Python Tests | |
| uses: thoughtparametersllc/python-testing@947908abd1dab777628becca5b772f26735e8146 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| requirements-file: 'requirements-dev.txt' | |
| pytest-options: '--cov=mypackage --cov-report=xml --cov-report=html' | |
| unittest-options: '-v -s tests' | |
| nose-options: '--verbose --with-coverage' | |
| behave-options: '--format=progress --tags=@automated' | |
| tox-options: '-e py${{ matrix.python-version }}' |