Skip to content

Use venv in CI #916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 26, 2024
Merged
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
12 changes: 10 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ jobs:
- uses: actions/checkout@v4

- name: Install Python dependencies
shell: bash
run: |
sudo apt-get update -y
sudo apt-get install -y python3-pip
sudo apt-get install -y python3-pip python3-venv
python3 -m venv .venv
source .venv/bin/activate
pip3 install --upgrade --requirement requirements.txt

- name: Install doxygen and graphviz
Expand All @@ -39,6 +42,7 @@ jobs:
run: |
source /opt/ros/rolling/setup.bash
source /root/ws_moveit/install/setup.bash
source .venv/bin/activate
./htmlproofer.sh

upload_site_artifacts:
Expand All @@ -58,9 +62,12 @@ jobs:
- uses: actions/checkout@v4

- name: Install Python dependencies
shell: bash
run: |
sudo apt-get update -y
sudo apt-get install -y python3-pip
sudo apt-get install -y python3-pip python3-venv
python3 -m venv .venv
source .venv/bin/activate
pip3 install --upgrade --requirement requirements.txt

- name: Install doxygen and graphviz
Expand All @@ -71,6 +78,7 @@ jobs:
run: |
source /opt/ros/${{ matrix.rosdistro }}/setup.bash
source /root/ws_moveit/install/setup.bash
source .venv/bin/activate
make generate_api_artifacts BRANCH=${{ matrix.branch }}

- name: Compress Artifact
Expand Down
15 changes: 14 additions & 1 deletion doc/how_to_contribute/how_to_contribute_to_site.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,20 @@ Steps

2. Test for broken links

To test for broken links run this command:
To test for broken links, run the ``htmlproofer`` script. Note that running this script may require you to install some Python dependencies. If using ``pip`` to install these dependencies, you may want to create a virtual environment.

.. code-block:: bash

python3 -m venv .venv
source .venv/bin/activate

You can then install requirements using ``pip``:

.. code-block:: bash

pip3 install --upgrade --requirement requirements.txt

You can run the ``htmlproofer`` script with this command:

.. code-block:: bash

Expand Down
3 changes: 2 additions & 1 deletion htmlproofer.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
# Note that a virtual environment is required when running this script in CI
set -e

# Define some config vars
Expand All @@ -12,7 +13,7 @@ gem install --user-install html-proofer -v 3.19.4 # newer 4.x requires different
PATH="$(ruby -r rubygems -e 'puts Gem.user_dir')/bin:$PATH"

# Install python dependencies
pip3 install --user --upgrade -r requirements.txt
pip3 install --upgrade -r requirements.txt

# Clear out any previous builds
rm -rf build
Expand Down
Loading