mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 17:28:58 +00:00
CI: Add virtualenv
This commit is contained in:
@@ -25,12 +25,33 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
ref: ${{ matrix.branch }}
|
ref: ${{ matrix.branch }}
|
||||||
|
|
||||||
|
- name: Get Python version
|
||||||
|
id: pythonv
|
||||||
|
run: |
|
||||||
|
echo "PYTHON_VERSION=$(python --version)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Restore cached virtualenv
|
||||||
|
uses: actions/cache/restore@v4
|
||||||
|
with:
|
||||||
|
key: venv-${{ runner.os }}-${{ steps.pythonv.outputs.PYTHON_VERSION }}-${{ hashFiles('requirements.txt') }}
|
||||||
|
path: .venv
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo pip3 install -r requirements.txt
|
python -m venv .venv
|
||||||
|
source .venv/bin/activate
|
||||||
|
python -m pip install -r requirements.txt
|
||||||
|
echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH
|
||||||
|
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install parallel libwebp7
|
sudo apt install parallel libwebp7
|
||||||
|
|
||||||
|
- name: Save virtualenv cache
|
||||||
|
uses: actions/cache/save@v4
|
||||||
|
with:
|
||||||
|
key: venv-${{ runner.os }}-${{ steps.pythonv.outputs.PYTHON_VERSION }}-${{ hashFiles('requirements.txt') }}
|
||||||
|
path: .venv
|
||||||
|
|
||||||
- name: Sphinx - Build HTML
|
- name: Sphinx - Build HTML
|
||||||
run: make SPHINXOPTS='--color -j 4' html
|
run: make SPHINXOPTS='--color -j 4' html
|
||||||
|
|
||||||
|
|||||||
@@ -18,9 +18,33 @@ jobs:
|
|||||||
- name: Style checks via pre-commit
|
- name: Style checks via pre-commit
|
||||||
uses: pre-commit/action@v3.0.1
|
uses: pre-commit/action@v3.0.1
|
||||||
|
|
||||||
|
- name: Get Python version
|
||||||
|
id: pythonv
|
||||||
|
run: |
|
||||||
|
echo "PYTHON_VERSION=$(python --version)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Restore cached virtualenv
|
||||||
|
uses: actions/cache/restore@v4
|
||||||
|
with:
|
||||||
|
key: venv-${{ runner.os }}-${{ steps.pythonv.outputs.PYTHON_VERSION }}-${{ hashFiles('requirements.txt') }}
|
||||||
|
path: .venv
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: sudo pip3 install -r requirements.txt
|
run: |
|
||||||
|
python -m venv .venv
|
||||||
|
source .venv/bin/activate
|
||||||
|
python -m pip install -r requirements.txt
|
||||||
|
echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH
|
||||||
|
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Save virtualenv cache
|
||||||
|
uses: actions/cache/save@v4
|
||||||
|
with:
|
||||||
|
key: venv-${{ runner.os }}-${{ steps.pythonv.outputs.PYTHON_VERSION }}-${{ hashFiles('requirements.txt') }}
|
||||||
|
path: .venv
|
||||||
|
|
||||||
# Use dummy builder to improve performance as we don't need the generated HTML in this workflow.
|
# Use dummy builder to improve performance as we don't need the generated HTML in this workflow.
|
||||||
- name: Sphinx build
|
- name: Sphinx build
|
||||||
run: make SPHINXOPTS='--color -j 4 -W' dummy
|
run: |
|
||||||
|
source .venv/bin/activate
|
||||||
|
make SPHINXOPTS='--color -j 4 -W' dummy
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ if not language in supported_languages.keys():
|
|||||||
is_i18n = tags.has("i18n") # noqa: F821
|
is_i18n = tags.has("i18n") # noqa: F821
|
||||||
print("Build language: {}, i18n tag: {}".format(language, is_i18n))
|
print("Build language: {}, i18n tag: {}".format(language, is_i18n))
|
||||||
|
|
||||||
exclude_patterns = ["_build"]
|
exclude_patterns = [".*", "**/.*", "_build", "_tools"]
|
||||||
|
|
||||||
# fmt: off
|
# fmt: off
|
||||||
# These imports should *not* be moved to the start of the file,
|
# These imports should *not* be moved to the start of the file,
|
||||||
|
|||||||
Reference in New Issue
Block a user