Skip to content

Commit

Permalink
ci: fix venv activation
Browse files Browse the repository at this point in the history
ci: specify Python version in venv

ci: adjust python handling

ci: install uv via curl
  • Loading branch information
seppzer0 committed Jan 18, 2025
1 parent 25a814a commit 7d13a4a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,20 @@ jobs:
with:
submodules: recursive

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install uv
run: |
uv_version=$(cat ./requirement-uv.txt | awk -F'==' '{print $2}' | tr -d ' \n')
curl -LsSf https://astral.sh/uv/${uv_version}/install.sh | sh
- name: Record original PATH
id: record_original_path
run: echo "PATH_ORIGINAL=$PATH" >> $GITHUB_OUTPUT

- name: Activate .venv
run: |
python3 -m pip install -r requirement-uv.txt
uv sync --frozen --no-install-project
source .venv/bin/activate
. .venv/bin/activate
echo PATH=${GITHUB_WORKSPACE}/.venv/bin:$PATH >> $GITHUB_ENV
- name: Build And Assemble
run: |
Expand All @@ -56,7 +60,7 @@ jobs:
if-no-files-found: "error"

- name: Deactivate .venv
run: deactivate
run: echo PATH=${{ steps.record_original_path.outputs.PATH_ORIGINAL }}

release:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13.1
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ dependencies = [
"requests ~=2.31",
"pathlib ~=1.0",
"typing ~=3.7",
"pydantic ~=2.6"
"pydantic ~=2.6",
"pip"
]

[project.urls]
Expand Down
11 changes: 11 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7d13a4a

Please sign in to comment.