| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent abbc92b commit f1d5262
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,6 +7,11 @@ on: | |||
| 7 | 7 | types: | |
| 8 | 8 | - opened | |
| 9 | 9 | - synchronize | |
| 10 | + | ||
| 11 | + env: | ||
| 12 | + UV_SYSTEM_PYTHON: 1 | ||
| 13 | + | ||
| 14 | + | ||
| 10 | 15 | jobs: | |
| 11 | 16 | changes: | |
| 12 | 17 | runs-on: ubuntu-latest | |
@@ -52,17 +57,19 @@ jobs: | |||
| 52 | 57 | uses: actions/setup-python@v5 | |
| 53 | 58 | with: | |
| 54 | 59 | python-version: "3.11" | |
| 55 | - - uses: actions/cache@v4 | ||
| 56 | - id: cache | ||
| 60 | + - name: Setup uv | ||
| 61 | + uses: astral-sh/setup-uv@v3 | ||
| 57 | 62 | with: | |
| 58 | - path: ${{ env.pythonLocation }} | ||
| 59 | - key: ${{ runner.os }}-python-docs-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-docs.txt', 'requirements-docs-insiders.txt', 'requirements-docs-tests.txt') }}-v02 | ||
| 63 | + version: "0.4.15" | ||
| 64 | + enable-cache: true | ||
| 65 | + cache-dependency-glob: | | ||
| 66 | + requirements**.txt | ||
| 67 | + pyproject.toml | ||
| 60 | 68 | - name: Install docs extras | |
| 61 | - if: steps.cache.outputs.cache-hit != 'true' | ||
| 62 | - run: pip install -r requirements-docs.txt | ||
| 69 | + run: uv pip install -r requirements-docs.txt | ||
| 63 | 70 | - name: Install Material for MkDocs Insiders | |
| 64 | - if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' ) && steps.cache.outputs.cache-hit != 'true' | ||
| 65 | - run: pip install -r requirements-docs-insiders.txt | ||
| 71 | + if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' ) | ||
| 72 | + run: uv pip install -r requirements-docs-insiders.txt | ||
| 66 | 73 | env: | |
| 67 | 74 | TOKEN: ${{ secrets.SQLMODEL_MKDOCS_MATERIAL_INSIDERS }} | |
| 68 | 75 | - uses: actions/cache@v4 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,6 +12,9 @@ permissions: | |||
| 12 | 12 | pull-requests: write | |
| 13 | 13 | statuses: write | |
| 14 | 14 | ||
| 15 | + env: | ||
| 16 | + UV_SYSTEM_PYTHON: 1 | ||
| 17 | + | ||
| 15 | 18 | jobs: | |
| 16 | 19 | deploy-docs: | |
| 17 | 20 | runs-on: ubuntu-latest | |
@@ -25,14 +28,16 @@ jobs: | |||
| 25 | 28 | uses: actions/setup-python@v5 | |
| 26 | 29 | with: | |
| 27 | 30 | python-version: "3.11" | |
| 28 | - - uses: actions/cache@v4 | ||
| 29 | - id: cache | ||
| 31 | + - name: Setup uv | ||
| 32 | + uses: astral-sh/setup-uv@v3 | ||
| 30 | 33 | with: | |
| 31 | - path: ${{ env.pythonLocation }} | ||
| 32 | - key: ${{ runner.os }}-python-github-actions-${{ env.pythonLocation }}-${{ hashFiles('requirements-github-actions.txt') }}-v01 | ||
| 34 | + version: "0.4.15" | ||
| 35 | + enable-cache: true | ||
| 36 | + cache-dependency-glob: | | ||
| 37 | + requirements**.txt | ||
| 38 | + pyproject.toml | ||
| 33 | 39 | - name: Install GitHub Actions dependencies | |
| 34 | - if: steps.cache.outputs.cache-hit != 'true' | ||
| 35 | - run: pip install -r requirements-github-actions.txt | ||
| 40 | + run: uv pip install -r requirements-github-actions.txt | ||
| 36 | 41 | - name: Deploy Docs Status Pending | |
| 37 | 42 | run: python ./scripts/deploy_docs_status.py | |
| 38 | 43 | env: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,6 +8,9 @@ on: | |||
| 8 | 8 | permissions: | |
| 9 | 9 | statuses: write | |
| 10 | 10 | ||
| 11 | + env: | ||
| 12 | + UV_SYSTEM_PYTHON: 1 | ||
| 13 | + | ||
| 11 | 14 | jobs: | |
| 12 | 15 | smokeshow: | |
| 13 | 16 | if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
@@ -17,16 +20,21 @@ jobs: | |||
| 17 | 20 | - uses: actions/setup-python@v5 | |
| 18 | 21 | with: | |
| 19 | 22 | python-version: '3.9' | |
| 20 | - | ||
| 21 | - - run: pip install smokeshow | ||
| 22 | - | ||
| 23 | + - name: Setup uv | ||
| 24 | + uses: astral-sh/setup-uv@v3 | ||
| 25 | + with: | ||
| 26 | + version: "0.4.15" | ||
| 27 | + enable-cache: true | ||
| 28 | + cache-dependency-glob: | | ||
| 29 | + requirements**.txt | ||
| 30 | + pyproject.toml | ||
| 31 | + - run: uv pip install -r requirements-github-actions.txt | ||
| 23 | 32 | - uses: actions/download-artifact@v4 | |
| 24 | 33 | with: | |
| 25 | 34 | name: coverage-html | |
| 26 | 35 | path: htmlcov | |
| 27 | 36 | github-token: ${{ secrets.GITHUB_TOKEN }} | |
| 28 | 37 | run-id: ${{ github.event.workflow_run.id }} | |
| 29 | - | ||
| 30 | 38 | - run: smokeshow upload htmlcov | |
| 31 | 39 | env: | |
| 32 | 40 | SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage} | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,6 +18,9 @@ on: | |||
| 18 | 18 | # cron every week on monday | |
| 19 | 19 | - cron: "0 0 * * 1" | |
| 20 | 20 | ||
| 21 | + env: | ||
| 22 | + UV_SYSTEM_PYTHON: 1 | ||
| 23 | + | ||
| 21 | 24 | jobs: | |
| 22 | 25 | test: | |
| 23 | 26 | runs-on: ubuntu-latest | |
@@ -34,33 +37,34 @@ jobs: | |||
| 34 | 37 | - pydantic-v1 | |
| 35 | 38 | - pydantic-v2 | |
| 36 | 39 | fail-fast: false | |
| 37 | - | ||
| 38 | 40 | steps: | |
| 39 | 41 | - uses: actions/checkout@v4 | |
| 40 | 42 | - name: Set up Python | |
| 41 | 43 | uses: actions/setup-python@v5 | |
| 42 | 44 | with: | |
| 43 | 45 | python-version: ${{ matrix.python-version }} | |
| 46 | + - name: Setup uv | ||
| 47 | + uses: astral-sh/setup-uv@v3 | ||
| 48 | + with: | ||
| 49 | + version: "0.4.15" | ||
| 50 | + enable-cache: true | ||
| 51 | + cache-dependency-glob: | | ||
| 52 | + requirements**.txt | ||
| 53 | + pyproject.toml | ||
| 44 | 54 | # Allow debugging with tmate | |
| 45 | 55 | - name: Setup tmate session | |
| 46 | 56 | uses: mxschmitt/action-tmate@v3 | |
| 47 | 57 | if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }} | |
| 48 | 58 | with: | |
| 49 | 59 | limit-access-to-actor: true | |
| 50 | - - uses: actions/cache@v4 | ||
| 51 | - id: cache | ||
| 52 | - with: | ||
| 53 | - path: ${{ env.pythonLocation }} | ||
| 54 | - key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-v01 | ||
| 55 | 60 | - name: Install Dependencies | |
| 56 | - if: steps.cache.outputs.cache-hit != 'true' | ||
| 57 | - run: pip install -r requirements-tests.txt | ||
| 61 | + run: uv pip install -r requirements-tests.txt | ||
| 58 | 62 | - name: Install Pydantic v1 | |
| 59 | 63 | if: matrix.pydantic-version == 'pydantic-v1' | |
| 60 | - run: pip install --upgrade "pydantic>=1.10.0,<2.0.0" | ||
| 64 | + run: uv pip install --upgrade "pydantic>=1.10.0,<2.0.0" | ||
| 61 | 65 | - name: Install Pydantic v2 | |
| 62 | 66 | if: matrix.pydantic-version == 'pydantic-v2' | |
| 63 | - run: pip install --upgrade "pydantic>=2.0.2,<3.0.0" "typing-extensions==4.6.1" | ||
| 67 | + run: uv pip install --upgrade "pydantic>=2.0.2,<3.0.0" "typing-extensions==4.6.1" | ||
| 64 | 68 | - name: Lint | |
| 65 | 69 | # Do not run on Python 3.7 as mypy behaves differently | |
| 66 | 70 | if: matrix.python-version != '3.7' && matrix.pydantic-version == 'pydantic-v2' | |
@@ -82,28 +86,31 @@ jobs: | |||
| 82 | 86 | needs: | |
| 83 | 87 | - test | |
| 84 | 88 | runs-on: ubuntu-latest | |
| 85 | - | ||
| 86 | 89 | steps: | |
| 87 | 90 | - uses: actions/checkout@v4 | |
| 88 | - | ||
| 89 | 91 | - uses: actions/setup-python@v5 | |
| 90 | 92 | with: | |
| 91 | 93 | python-version: '3.12' | |
| 92 | - | ||
| 94 | + - name: Setup uv | ||
| 95 | + uses: astral-sh/setup-uv@v3 | ||
| 96 | + with: | ||
| 97 | + version: "0.4.15" | ||
| 98 | + enable-cache: true | ||
| 99 | + cache-dependency-glob: | | ||
| 100 | + requirements**.txt | ||
| 101 | + pyproject.toml | ||
| 93 | 102 | - name: Get coverage files | |
| 94 | 103 | uses: actions/download-artifact@v4 | |
| 95 | 104 | with: | |
| 96 | 105 | pattern: coverage-* | |
| 97 | 106 | path: coverage | |
| 98 | 107 | merge-multiple: true | |
| 99 | - | ||
| 100 | - - run: pip install coverage[toml] | ||
| 101 | - | ||
| 108 | + - name: Install Dependencies | ||
| 109 | + run: uv pip install -r requirements-tests.txt | ||
| 102 | 110 | - run: ls -la coverage | |
| 103 | 111 | - run: coverage combine coverage | |
| 104 | 112 | - run: coverage report | |
| 105 | 113 | - run: coverage html --title "Coverage for ${{ github.sha }}" | |
| 106 | - | ||
| 107 | 114 | - name: Store coverage HTML | |
| 108 | 115 | uses: actions/upload-artifact@v4 | |
| 109 | 116 | with: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,3 +2,4 @@ PyGithub>=2.3.0,<3.0.0 | |||
| 2 | 2 | pydantic>=2.5.3,<3.0.0 | |
| 3 | 3 | pydantic-settings>=2.1.0,<3.0.0 | |
| 4 | 4 | httpx>=0.27.0,<0.28.0 | |
| 5 | + smokeshow | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments