Skip to content

Commit

Permalink
ENH: install uv in action
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Mar 5, 2024
1 parent c037294 commit 89a28ff
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
"codecov",
"commitlint",
"compwa",
"elif",
"prereleased",
"pyproject",
"redeboer",
"venv"
],
Expand Down
24 changes: 23 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,30 @@ runs:
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- run: pip install git+https://github.com/ComPWA/update-pip-constraints@v1

- name: Determine package configuration file
run: |
if [ -f pyproject.toml ]; then
if grep -q "\[project\]" pyproject.toml; then
echo 'SETUP_FILE=pyproject.toml' | tee -a $GITHUB_ENV
fi
elif [ -f setup.cfg ]; then
if grep -q "\[metadata\]" setup.cfg && grep -q "\[options\]" setup.cfg; then
echo 'SETUP_FILE=setup.cfg' | tee -a $GITHUB_ENV
fi
fi
shell: bash

- if: env.SETUP_FILE == setup.cfg
run: |
pip install update-pip-constraints@git+https://github.com/ComPWA/update-pip-constraints@v1
shell: bash
- if: env.SETUP_FILE == pyproject.toml
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install update-pip-constraints@git+https://github.com/ComPWA/update-pip-constraints@v1
shell: bash

- run: update-pip-constraints
shell: bash
- uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 89a28ff

Please sign in to comment.