Add initial tox test #3
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: Tox unit tests | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_call: | |
| inputs: | |
| ref: | |
| type: string | |
| description: The ref to build. | |
| required: true | |
| jobs: | |
| build: | |
| name: Tox unit tests and linting | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.10'] | |
| steps: | |
| - name: Check out the repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ inputs.ref || github.ref }} | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install tox | |
| - name: Test with tox | |
| run: tox | |
| - name: Generate coverage reports | |
| run: tox -e cover | |
| - name: Archive code coverage results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: code-coverage-report | |
| path: cover/ |