Skip to content

Migrate from pip to uv for dependency management (#447) #373

Migrate from pip to uv for dependency management (#447)

Migrate from pip to uv for dependency management (#447) #373

Workflow file for this run

name: Push
on:
push:
branches: [master]
jobs:
Lint:
runs-on: ubuntu-latest
if: |
(github.repository == 'PolicyEngine/policyengine-core')
&& (github.event.head_commit.message == 'Update PolicyEngine Core')
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Check formatting
run: uvx ruff format --check .
versioning:
name: Update versioning
if: |
(github.repository == 'PolicyEngine/policyengine-core')
&& !(github.event.head_commit.message == 'Update PolicyEngine Core')
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with: token: ${{ secrets.POLICYENGINE_GITHUB }}

Check failure on line 26 in .github/workflows/push.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/push.yaml

Invalid workflow file

You have an error in your yaml syntax on line 26
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.14"
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Build changelog
run: |
uv pip install --system towncrier
python .github/bump_version.py
towncrier build --yes --version $(python -c "import re; print(re.search(r'version = \"(.+?)\"', open('pyproject.toml').read()).group(1))")
- name: Preview changelog update
run: ".github/get-changelog-diff.sh"
- name: Update changelog
uses: EndBug/add-and-commit@v9
with:
add: "."
committer_name: Github Actions[bot]
author_name: Github Actions[bot]
message: Update PolicyEngine Core
Test:
runs-on: ubuntu-latest
if: |
(github.repository == 'PolicyEngine/policyengine-core')
&& (github.event.head_commit.message == 'Update PolicyEngine Core')
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.14"
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Install package
run: make install
- name: Run tests
run: make test
- uses: codecov/codecov-action@v4
- name: Generate documentation
run: make documentation
- name: Deploy documentation
if: matrix.os == 'ubuntu-latest'
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs/_build/html # The folder the action should deploy.
Publish:
runs-on: ubuntu-latest
if: |
(github.repository == 'PolicyEngine/policyengine-core')
&& (github.event.head_commit.message == 'Update PolicyEngine Core')
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.14"
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Publish a git tag
run: ".github/publish-git-tag.sh || true"
- name: Install package
run: make install
- name: Build package
run: make build
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI }}
skip_existing: true