-
Notifications
You must be signed in to change notification settings - Fork 191
Migrate to uv #540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate to uv #540
Changes from 3 commits
173ece7
861799a
a0a07d3
0c47bf9
4f9692f
43b9902
a5c9385
79ee4c3
9d4e989
01311ba
25eeac4
fa3d8f3
f3d3f2d
53ac67f
7203bdf
cbd1a59
9d13a9e
564a5a6
c8aa0cb
e84ef5e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,42 +11,21 @@ env: | |
| PIPELINE_FAMILY: "general" | ||
|
|
||
| jobs: | ||
| setup: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: actions/cache@v5 | ||
| id: virtualenv-cache | ||
| with: | ||
| path: | | ||
| .venv | ||
| key: ci-venv-${{ env.PIPELINE_FAMILY }}-${{ hashFiles('requirements/*.txt') }} | ||
| - name: Set up Python ${{ env.PYTHON_VERSION }} | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: ${{ env.PYTHON_VERSION }} | ||
| - name: Setup virtual environment (no cache hit) | ||
| if: steps.virtualenv-cache.outputs.cache-hit != 'true' | ||
| run: | | ||
| python${{ env.PYTHON_VERSION }} -m venv .venv | ||
| source .venv/bin/activate | ||
| make install-ci | ||
|
|
||
| lint: | ||
| runs-on: ubuntu-latest | ||
| needs: setup | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: actions/cache@v5 | ||
| id: virtualenv-cache | ||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| path: | | ||
| .venv | ||
| key: ci-venv-${{ env.PIPELINE_FAMILY }}-${{ hashFiles('requirements/*.txt') }} | ||
| enable-cache: true | ||
| cache-dependency-glob: "uv.lock" | ||
| - name: Set up Python ${{ env.PYTHON_VERSION }} | ||
| run: uv python install ${{ env.PYTHON_VERSION }} | ||
| - name: Install dependencies | ||
| run: uv sync --extra test --frozen | ||
| - name: Lint | ||
| run: | | ||
| source .venv/bin/activate | ||
| make check | ||
| run: make check | ||
|
|
||
| shellcheck: | ||
| runs-on: ubuntu-latest | ||
|
|
@@ -57,26 +36,20 @@ jobs: | |
|
|
||
| test: | ||
| runs-on: ubuntu-latest | ||
| needs: [setup, lint] | ||
| needs: lint | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: actions/cache@v5 | ||
| id: virtualenv-cache | ||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| path: | | ||
| .venv | ||
| key: ci-venv-${{ env.PIPELINE_FAMILY }}-${{ hashFiles('requirements/test.txt') }} | ||
|
|
||
| enable-cache: true | ||
| cache-dependency-glob: "uv.lock" | ||
| - name: Set up Python ${{ env.PYTHON_VERSION }} | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: ${{ env.PYTHON_VERSION }} | ||
| - name: Run core tests | ||
| run: uv python install ${{ env.PYTHON_VERSION }} | ||
| - name: Install dependencies and run core tests | ||
| run: | | ||
| python${{ env.PYTHON_VERSION }} -m venv .venv | ||
| source .venv/bin/activate | ||
| sudo apt-get update && sudo apt-get install --yes poppler-utils libreoffice | ||
| make install-test | ||
| uv sync --extra test --frozen | ||
| make install-pandoc | ||
| sudo add-apt-repository -y ppa:alex-p/tesseract-ocr5 | ||
| sudo apt-get install -y tesseract-ocr tesseract-ocr-kor | ||
|
|
@@ -101,23 +74,18 @@ jobs: | |
| uses: dangoslen/changelog-enforcer@v3 | ||
|
|
||
| # TODO - figure out best practice for caching docker images | ||
| # (Using the virtualenv to get pytest) | ||
| test_dockerfile: | ||
| runs-on: ubuntu-latest | ||
| needs: [setup, lint] | ||
| needs: lint | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: actions/cache@v5 | ||
| id: virtualenv-cache | ||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| python-version: ${{ env.PYTHON_VERSION }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Smoke test fails: bare
|
||
| path: | | ||
| .venv | ||
| key: ci-venv-${{ env.PIPELINE_FAMILY }}-${{ hashFiles('requirements/test.txt') }} | ||
| enable-cache: true | ||
| cache-dependency-glob: "uv.lock" | ||
| - name: Set up Python ${{ env.PYTHON_VERSION }} | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: ${{ env.PYTHON_VERSION }} | ||
| run: uv python install ${{ env.PYTHON_VERSION }} | ||
| - name: Free up disk space | ||
| run: | | ||
| # Clear some space (https://github.com/actions/runner-images/issues/2840) | ||
|
|
@@ -140,14 +108,6 @@ jobs: | |
| df -h | ||
| - name: Test Dockerfile | ||
| run: | | ||
| python${{ env.PYTHON_VERSION }} -m venv .venv | ||
| source .venv/bin/activate | ||
| make install-test | ||
| uv sync --extra test --frozen | ||
| make docker-build | ||
| make docker-test | ||
| # - name: Scan image | ||
| # uses: anchore/scan-action@v3 | ||
| # with: | ||
| # image: "pipeline-family-${{ env.PIPELINE_FAMILY }}-dev" | ||
| # # NOTE(robinson) - revert this to medium when we bump libreoffice | ||
| # severity-cutoff: critical | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -120,6 +120,9 @@ venv.bak/ | |
| # mkdocs documentation | ||
| /site | ||
|
|
||
| # ruff | ||
| .ruff_cache/ | ||
|
|
||
| # mypy | ||
| .mypy_cache/ | ||
| .dmypy.json | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.