-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
59 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: πͺ Code Embedder uv | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
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') }} | ||
|
||
- name: π₯ Install the project | ||
run: | | ||
uv sync --all-extras --dev | ||
uv pip install . | ||
- name: πͺ Format raw code snippets with ruff | ||
run: | | ||
pipx install ruff | ||
ruff format dev/readme_snippets/ | ||
- name: πͺ Format print comments in code snippets | ||
run: python dev/scripts/format_snippet_prints.py | ||
|
||
- name: π Run code embedder | ||
uses: kvankova/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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