Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/actions/version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ runs:
- name: Install and run avocado --version
shell: sh
run: |
python3 setup.py develop --user
export PIP_BREAK_SYSTEM_PACKAGES=1
python3 -m pip install --user -U pip
python3 -m pip install --user -e .
python3 -m avocado --version
32 changes: 17 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Run static checks
env:
COMMIT_COUNT: ${{ github.event.pull_request.commits }}
run: python3 setup.py test --select=static-checks
run: python3 -m selftests.check --select=static-checks
- name: Archive failed tests logs
if: failure()
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -86,17 +86,17 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -V --version
run: python -VV
- name: Install setuptools on Python >= 3.12
run: python3 -c 'import setuptools' || python3 -m pip install "setuptools<80"
- name: Install dependencies
run: pip install -r requirements-dev.txt
run: python3 -m pip install -r requirements-dev.txt
- name: Installing Avocado in develop mode
run: python3 setup.py develop --user
- name: Avocado version
run: avocado --version
- name: Unittests and fast functional tests
run: python3 setup.py test --skip=static-checks
run: python3 -m selftests.check --skip=static-checks
- name: Archive failed tests logs
if: failure()
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -V --version
run: python -VV
- name: Install avocado
run: |
python3 -m pip install -r requirements-dev.txt
Expand All @@ -140,7 +140,7 @@ jobs:
- name: List test
run: python -m avocado --verbose list selftests/unit/* selftests/functional/* selftests/*sh
- name: Run a subset of avocado's selftests
run: PATH=~/Library/Python/3.11/bin:$PATH ./selftests/check.py --skip=static-checks
run: PATH=~/Library/Python/3.11/bin:$PATH python3 -m selftests.check --skip=static-checks
- run: echo "🥑 This job's status is ${{ job.status }}."


Expand All @@ -164,11 +164,11 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -V --version
run: python -VV
- name: Install setuptools on Python >= 3.12
run: python -c 'import setuptools' || python -m pip install "setuptools<80"
- name: Install avocado
run: python setup.py develop --user
run: python -m pip install --user -e .
- name: Show avocado help
run: python -m avocado --help
- name: Example test
Expand Down Expand Up @@ -262,7 +262,7 @@ jobs:
image: fedora:40
steps:
- name: Install Python dependencies
run: dnf -y install python3 python3-setuptools
run: dnf -y install python3 python3-pip
- name: Check out repository code
uses: actions/checkout@v4
- uses: ./.github/actions/version
Expand All @@ -275,7 +275,7 @@ jobs:
image: fedora:41
steps:
- name: Install Python dependencies
run: dnf -y install python3-setuptools
run: dnf -y install python3-pip
- name: Check out repository code
uses: actions/checkout@v4
- uses: ./.github/actions/version
Expand All @@ -288,7 +288,7 @@ jobs:
image: registry.access.redhat.com/ubi8/ubi:8.8
steps:
- name: Install Python dependencies
run: dnf -y install python3.11 python3.11-setuptools python3.11-setuptools-rust
run: dnf -y install python3.11 python3.11-pip
- name: Check out repository code
uses: actions/checkout@v4
- uses: ./.github/actions/version
Expand All @@ -300,6 +300,8 @@ jobs:
container:
image: registry.access.redhat.com/ubi9/ubi:9.2
steps:
- name: Install Python dependencies
run: dnf -y install python3 python3-pip
- name: Check out repository code
uses: actions/checkout@v4
- uses: ./.github/actions/version
Expand All @@ -312,7 +314,7 @@ jobs:
image: debian:12.4
steps:
- name: Install Python dependencies
run: apt update && apt -y install python3 python3-setuptools
run: apt update && apt -y install python3 python3-venv python3-pip
- name: Check out repository code
uses: actions/checkout@v4
- uses: ./.github/actions/version
Expand All @@ -325,7 +327,7 @@ jobs:
image: debian:11.0
steps:
- name: Install Python dependencies
run: apt update && apt -y install python3 python3-setuptools
run: apt update && apt -y install python3 python3-venv python3-pip
- name: Check out repository code
uses: actions/checkout@v4
- uses: ./.github/actions/version
Expand All @@ -338,7 +340,7 @@ jobs:
image: ubuntu:24.04
steps:
- name: Install Python dependencies
run: apt update && apt -y install python3 python3-setuptools ca-certificates
run: apt update && apt -y install python3 python3-venv python3-pip ca-certificates
- name: Check out repository code
uses: actions/checkout@v4
- uses: ./.github/actions/version
Expand All @@ -351,7 +353,7 @@ jobs:
image: ubuntu:22.04
steps:
- name: Install Python dependencies
run: apt update && apt -y install python3 python3-setuptools ca-certificates
run: apt update && apt -y install python3 python3-venv python3-pip ca-certificates
- name: Check out repository code
uses: actions/checkout@v4
- uses: ./.github/actions/version
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ jobs:
fetch-depth: 0
- name: Install avocado
run: |
pip install -r requirements-dev.txt
python3 setup.py develop --user
python3 -m pip install -r requirements-dev.txt
python3 -m pip install --user -e .
- name: Avocado pre-release job
run: python3 setup.py test --select=pre-release,vmimage
run: python3 -m selftets.check --select=pre-release,vmimage
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Critical typo in module name.

The command contains a typo: selftets.check should be selftests.check. This will cause the workflow to fail with a module not found error.

Apply this diff:

-        run: python3 -m selftets.check --select=pre-release,vmimage
+        run: python3 -m selftests.check --select=pre-release,vmimage
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
run: python3 -m selftets.check --select=pre-release,vmimage
run: python3 -m selftests.check --select=pre-release,vmimage
🤖 Prompt for AI Agents
In .github/workflows/prerelease.yml at line 51, the workflow command misspells
the Python module as "selftets.check"; update it to "selftests.check" so the run
step reads the correct module name, ensuring the workflow invokes python3 -m
selftests.check --select=pre-release,vmimage.

- name: Save artifacts
if: failure()
uses: actions/upload-artifact@v4
Expand Down
84 changes: 42 additions & 42 deletions .github/workflows/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Installing Avocado
run: python3 setup.py install --user
run: python3 -m pip install --user -e .
- name: Installing plugins
run: |
python3 setup.py plugin --install=golang --user
python3 setup.py plugin --install=html --user
python3 setup.py plugin --install=result_upload --user
python3 setup.py plugin --install=resultsdb --user
python3 setup.py plugin --install=robot --user
python3 setup.py plugin --install=varianter_cit --user
python3 setup.py plugin --install=varianter_pict --user
python3 setup.py plugin --install=varianter_yaml_to_mux --user
python3 -m pip install ./optional_plugins/golang --user
python3 -m pip install ./optional_plugins/html --user
python3 -m pip install ./optional_plugins/result_upload --user
python3 -m pip install ./optional_plugins/resultsdb --user
python3 -m pip install ./optional_plugins/robot --user
python3 -m pip install ./optional_plugins/varianter_cit --user
python3 -m pip install ./optional_plugins/varianter_pict --user
python3 -m pip install ./optional_plugins/varianter_yaml_to_mux --user
- name: Avocado version
Comment on lines +33 to 44
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Ensure PATH includes user base bin for --user installs.

Commands installed to ~/.local/bin may not be on PATH; avocado may not be found.

Add after Python setup (once per job using --user):

- name: Add user base bin to PATH
  run: echo "$(python3 -m site --user-base)/bin" >> "$GITHUB_PATH"

Also applies to: 115-116

🤖 Prompt for AI Agents
.github/workflows/setup.yml around lines 33 to 44 (and also apply same change at
lines 115-116): the workflow uses pip --user to install packages which drop
executables into the per-user bin (e.g. ~/.local/bin) that may not be on PATH;
add a job step right after the Python setup/install step to append the user base
bin to GITHUB_PATH so subsequent steps can find those installed commands (use
python3 -m site --user-base to compute the path and echo "<that>/bin" >>
"$GITHUB_PATH").

run: avocado --version
- name: Avocado smoketest
Expand Down Expand Up @@ -70,17 +70,17 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Installing Avocado
run: python3 setup.py install
run: python3 -m pip install .
- name: Installing plugins
run: |
python3 setup.py plugin --install=golang
python3 setup.py plugin --install=html
python3 setup.py plugin --install=result_upload
python3 setup.py plugin --install=resultsdb
python3 setup.py plugin --install=robot
python3 setup.py plugin --install=varianter_cit
python3 setup.py plugin --install=varianter_pict
python3 setup.py plugin --install=varianter_yaml_to_mux
python3 -m pip install ./optional_plugins/golang
python3 -m pip install ./optional_plugins/html
python3 -m pip install ./optional_plugins/result_upload
python3 -m pip install ./optional_plugins/resultsdb
python3 -m pip install ./optional_plugins/robot
python3 -m pip install ./optional_plugins/varianter_cit
python3 -m pip install ./optional_plugins/varianter_pict
python3 -m pip install ./optional_plugins/varianter_yaml_to_mux
- name: Avocado version
run: avocado --version
- name: Avocado smoketest
Expand Down Expand Up @@ -112,17 +112,17 @@ jobs:
- name: Install dependencies
run: pip3 install -r requirements-dev.txt
- name: Installing Avocado in develop mode
run: python3 setup.py develop --user
run: python3 -m pip install --user -e .
- name: Avocado version
run: avocado --version
- name: Avocado smoketest
run: avocado run examples/tests/passtest.py
- name: Avocado build manpage
run: python3 setup.py man
run: make man
- name: Tree static check, unittests and fast functional tests
run: python3 setup.py test
run: python3 -m selftests.check
- name: Uninstall avocado
run: python3 setup.py develop --user --uninstall
run: python3 -m pip uninstall -y avocado-framework
- run: echo "🥑 This job's status is ${{ job.status }}."


Expand All @@ -148,17 +148,17 @@ jobs:
- name: Install dependencies
run: pip3 install -r requirements-dev.txt
- name: Installing Avocado in develop mode
run: python3 setup.py develop
run: python3 -m pip install -e .
- name: Avocado version
run: avocado --version
- name: Avocado smoketest
run: avocado run examples/tests/passtest.py
- name: Avocado build manpage
run: python3 setup.py man
run: make man
- name: Tree static check, unittests and fast functional tests
run: python3 setup.py test
run: python3 -m selftests.check
- name: Uninstall avocado
run: python3 setup.py develop --uninstall
run: python3 -m pip uninstall -y avocado-framework
- run: echo "🥑 This job's status is ${{ job.status }}."


Expand All @@ -178,20 +178,20 @@ jobs:
sudo apt-get install -y python3-virtualenv
- name: virtualenv
run: |
python3 -m venv env
source env/bin/activate
python3 setup.py install
python3 setup.py plugin --install=golang
python3 setup.py plugin --install=html
python3 setup.py plugin --install=result_upload
python3 setup.py plugin --install=resultsdb
python3 setup.py plugin --install=robot
python3 setup.py plugin --install=varianter_cit
python3 setup.py plugin --install=varianter_pict
python3 setup.py plugin --install=varianter_yaml_to_mux
avocado --version
avocado run examples/tests/passtest.py
deactivate
python3 -m venv env
source env/bin/activate
python3 -m pip install .
python3 -m pip install ./optional_plugins/golang
python3 -m pip install ./optional_plugins/html
python3 -m pip install ./optional_plugins/result_upload
python3 -m pip install ./optional_plugins/resultsdb
python3 -m pip install ./optional_plugins/robot
python3 -m pip install ./optional_plugins/varianter_cit
python3 -m pip install ./optional_plugins/varianter_pict
python3 -m pip install ./optional_plugins/varianter_yaml_to_mux
avocado --version
avocado run examples/tests/passtest.py
deactivate
- run: echo "🥑 This job's status is ${{ job.status }}."

devel-virtualenv-installation:
Expand All @@ -213,9 +213,9 @@ jobs:
python3 -m venv env
source env/bin/activate
pip install -r requirements-dev.txt
python3 setup.py develop
python3 -m pip install -e .
avocado --version
avocado run examples/tests/passtest.py
python3 setup.py test --skip static-checks
python3 -m selftests.check --skip=static-checks
deactivate
- run: echo "🥑 This job's status is ${{ job.status }}."
2 changes: 1 addition & 1 deletion .github/workflows/vmimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Install
run: pip install -r requirements-dev.txt
- name: Avocado build
run: python setup.py develop --user
run: python -m pip install --user -e .
- name: Run script
run: ./selftests/run_coverage --select=vmimage
- name: Push results to codecov
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ jobs:
- name: Install dependencies
run: pip install -r requirements-dev.txt
- name: Installing Avocado in develop mode
run: python3 setup.py develop --user
run: python3 -m pip install --user -e .
- name: Avocado version
run: avocado --version
- name: Avocado smoketest
run: python -m avocado run examples/tests/passtest.py
- name: Tree static check, unittests and fast functional tests
run: |
export AVOCADO_CHECK_LEVEL="1"
python3 selftests/check.py
python3 -m selftests.check
- name: Archive test logs
if: failure()
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -80,13 +80,13 @@ jobs:
- name: Install dependencies
run: pip install -r requirements-dev.txt
- name: Installing Avocado in develop mode
run: python3 setup.py develop --user --skip-optional-plugins --skip-examples-plugins-tests
run: python3 -m pip install --user -e .
- name: Avocado version
run: avocado --version
- name: Tree static check, unittests and fast functional tests without plugins
run: |
export AVOCADO_CHECK_LEVEL="1"
python3 selftests/check.py --disable-plugin-checks golang,html,resultsdb,result_upload,robot,varianter_cit,varianter_pict,varianter_yaml_to_mux
python3 -m selftests.check --disable-plugin-checks golang,html,resultsdb,result_upload,robot,varianter_cit,varianter_pict,varianter_yaml_to_mux
- name: Archive test logs
if: failure()
uses: actions/upload-artifact@v4
Expand Down
Loading
Loading