π§ Re-remove the file #21
This file contains 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: πͺ Code Embedder | |
on: [push, pull_request] | |
permissions: | |
contents: write | |
jobs: | |
code_embedder: | |
name: "Code embedder" | |
runs-on: ubuntu-latest | |
env: | |
PYTHON_VERSION: "3.12" | |
UV_SYSTEM_PYTHON: 1 | |
steps: | |
- name: ποΈ Checkout | |
uses: actions/checkout@v4 | |
# with: | |
# ref: ${{ github.event.pull_request.head.ref }} | |
- name: π Install uv with caching | |
uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
version: "0.5.4" | |
- name: π Set up Python ${{ env.PYTHON_VERSION }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: πΎ Setup pip cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('uv.lock') }} | |
restore-keys: ${{ runner.os }}-pip- | |
- name: π₯ Install the project | |
run: | | |
# uv sync --all-extras --dev | |
# uv pip install . | |
pip install . | |
# - name: ποΈ Activate virtual environment | |
# run: | | |
# source .venv/bin/activate | |
# echo PATH=$PATH >> $GITHUB_ENV | |
- name: πͺ Format comments in code snippets | |
run: python dev/scripts/format_snippet_prints.py | |
# - name: ποΈ Deactivate virtual environment | |
# run: | | |
# unset -f pydoc > /dev/null 2>&1 || true | |
# if ! [ -z "${_OLD_VIRTUAL_PATH:+_}" ] | |
# then | |
# PATH="$_OLD_VIRTUAL_PATH" | |
# export PATH | |
# unset _OLD_VIRTUAL_PATH | |
# fi | |
# if ! [ -z "${_OLD_VIRTUAL_PYTHONHOME+_}" ] | |
# then | |
# PYTHONHOME="$_OLD_VIRTUAL_PYTHONHOME" | |
# export PYTHONHOME | |
# unset _OLD_VIRTUAL_PYTHONHOME | |
# fi | |
# hash -r 2> /dev/null | |
# if ! [ -z "${_OLD_VIRTUAL_PS1+_}" ] | |
# then | |
# PS1="$_OLD_VIRTUAL_PS1" | |
# export PS1 | |
# unset _OLD_VIRTUAL_PS1 | |
# fi | |
# unset VIRTUAL_ENV | |
# unset VIRTUAL_ENV_PROMPT | |
# if [ ! "${1-}" = "nondestructive" ] | |
# then | |
# unset -f deactivate | |
# fi | |
- name: π Run code embedder | |
uses: kvankova/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |