Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fixes bug where process isn't completed by the time the process gets … #574

fixes bug where process isn't completed by the time the process gets …

fixes bug where process isn't completed by the time the process gets … #574

Workflow file for this run

# SPDX-License-Identifier: Apache-2.0
name: "Run unit tests via Tox::pytest"
on:
# run against every merge commit to 'main' and release branches
push:
branches:
- main
- release-*
# only run on PRs that touch certain regex paths
pull_request:
branches:
- main
- release-*
paths:
# note this should match the merging criteria in 'mergify.yml'
- "**.py"
- "tox.ini"
- "pyproject.toml"
- "requirements.txt"
- "requirements-dev.txt"
- "constraints-dev.txt"
- ".github/workflows/unit.yaml" # This workflow
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
defaults:
run:
shell: bash
jobs:
run-unit-tests:
name: "unit: ${{ matrix.python }} on ${{ matrix.platform }}"
runs-on: "${{ matrix.platform }}"
strategy:
fail-fast: false
matrix:
python:
- "3.11"
- "3.12"
- "3.13"
platform:
- "ubuntu-latest"
# It is important that this job has no write permissions and has
# no access to any secrets. This part is where we are running
# untrusted code from PRs.
permissions: {}
steps:
- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "${{ matrix.python }}"
- name: "Checkout code"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
# installs in $GITHUB_WORKSPACE/venv.
# only has to install Tox because Tox will do the other virtual environment management.
- name: "Setup Python virtual environment"
run: |
python -m venv --upgrade-deps venv
. venv/bin/activate
pip install tox -c constraints-dev.txt
- name: "Show disk utilization BEFORE tests"
if: always()
run: |
df -h
- name: "Run unit tests with Tox and Pytest"
run: |
source venv/bin/activate
tox -e py3-unit
- name: "Show disk utilization AFTER tests"
if: always()
run: |
df -h