Skip to content

Commit 789d707

Browse files
authored
Merge branch 'main' into dependabot/github_actions/actions/download-artifact-6
2 parents 3ac9937 + 00ddec8 commit 789d707

46 files changed

Lines changed: 5899 additions & 567 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ updates:
77
interval: "daily"
88
commit-message:
99
prefix:
10+
labels: [dependencies, internal]
1011
# Python
11-
- package-ecosystem: "pip"
12+
- package-ecosystem: "uv"
1213
directory: "/"
1314
schedule:
1415
interval: "daily"
1516
commit-message:
1617
prefix:
18+
labels: [dependencies, internal]

.github/workflows/issue-manager.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
env:
2828
GITHUB_CONTEXT: ${{ toJson(github) }}
2929
run: echo "$GITHUB_CONTEXT"
30-
- uses: tiangolo/issue-manager@0.5.1
30+
- uses: tiangolo/issue-manager@0.6.0
3131
with:
3232
token: ${{ secrets.GITHUB_TOKEN }}
3333
config: >

.github/workflows/pre-commit.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
9+
env:
10+
# Forks and Dependabot don't have access to secrets
11+
HAS_SECRETS: ${{ secrets.PRE_COMMIT != '' }}
12+
13+
jobs:
14+
pre-commit:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Dump GitHub context
18+
env:
19+
GITHUB_CONTEXT: ${{ toJson(github) }}
20+
run: echo "$GITHUB_CONTEXT"
21+
- uses: actions/checkout@v5
22+
name: Checkout PR for own repo
23+
if: env.HAS_SECRETS == 'true'
24+
with:
25+
# To be able to commit it needs to fetch the head of the branch, not the
26+
# merge commit
27+
ref: ${{ github.head_ref }}
28+
# And it needs the full history to be able to compute diffs
29+
fetch-depth: 0
30+
# A token other than the default GITHUB_TOKEN is needed to be able to trigger CI
31+
token: ${{ secrets.PRE_COMMIT }}
32+
# pre-commit lite ci needs the default checkout configs to work
33+
- uses: actions/checkout@v5
34+
name: Checkout PR for fork
35+
if: env.HAS_SECRETS == 'false'
36+
with:
37+
# To be able to commit it needs the head branch of the PR, the remote one
38+
ref: ${{ github.event.pull_request.head.sha }}
39+
fetch-depth: 0
40+
- name: Set up Python
41+
uses: actions/setup-python@v6
42+
with:
43+
python-version: "3.14"
44+
- name: Setup uv
45+
uses: astral-sh/setup-uv@v7
46+
with:
47+
cache-dependency-glob: |
48+
pyproject.toml
49+
uv.lock
50+
- name: Run prek - pre-commit
51+
id: precommit
52+
run: uvx prek run --from-ref origin/${GITHUB_BASE_REF} --to-ref HEAD --show-diff-on-failure
53+
continue-on-error: true
54+
- name: Commit and push changes
55+
if: env.HAS_SECRETS == 'true'
56+
run: |
57+
git config user.name "github-actions[bot]"
58+
git config user.email "github-actions[bot]@users.noreply.github.com"
59+
git add -A
60+
if git diff --staged --quiet; then
61+
echo "No changes to commit"
62+
else
63+
git commit -m "🎨 Auto format"
64+
git push
65+
fi
66+
- uses: pre-commit-ci/lite-action@v1.1.0
67+
if: env.HAS_SECRETS == 'false'
68+
with:
69+
msg: 🎨 Auto format
70+
- name: Error out on pre-commit errors
71+
if: steps.precommit.outcome == 'failure'
72+
run: exit 1
73+
74+
# https://github.com/marketplace/actions/alls-green#why
75+
pre-commit-alls-green: # This job does nothing and is only used for the branch protection
76+
if: always()
77+
needs:
78+
- pre-commit
79+
runs-on: ubuntu-latest
80+
steps:
81+
- name: Dump GitHub context
82+
env:
83+
GITHUB_CONTEXT: ${{ toJson(github) }}
84+
run: echo "$GITHUB_CONTEXT"
85+
- name: Decide whether the needed jobs succeeded or failed
86+
uses: re-actors/alls-green@release/v1
87+
with:
88+
jobs: ${{ toJSON(needs) }}

.github/workflows/publish.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,20 @@ jobs:
1010
runs-on: ubuntu-latest
1111
permissions:
1212
id-token: write
13+
contents: read
1314
steps:
1415
- name: Dump GitHub context
1516
env:
1617
GITHUB_CONTEXT: ${{ toJson(github) }}
1718
run: echo "$GITHUB_CONTEXT"
1819
- uses: actions/checkout@v5
1920
- name: Set up Python
20-
uses: actions/setup-python@v5
21+
uses: actions/setup-python@v6
2122
with:
22-
python-version: "3.10"
23-
- name: Install build dependencies
24-
run: pip install build
23+
python-version-file: "pyproject.toml"
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v7
2526
- name: Build distribution
26-
run: python -m build
27+
run: uv build
2728
- name: Publish
28-
uses: pypa/gh-action-pypi-publish@v1.13.0
29+
run: uv publish

.github/workflows/smokeshow.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,16 @@ permissions:
1010

1111
jobs:
1212
smokeshow:
13-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1413
runs-on: ubuntu-latest
1514

1615
steps:
1716
- name: Dump GitHub context
1817
env:
1918
GITHUB_CONTEXT: ${{ toJson(github) }}
2019
run: echo "$GITHUB_CONTEXT"
21-
- uses: actions/setup-python@v5
20+
- uses: actions/setup-python@v6
2221
with:
23-
python-version: '3.9'
22+
python-version: '3.13'
2423

2524
- run: pip install smokeshow
2625

.github/workflows/test-redistribute.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
run: echo "$GITHUB_CONTEXT"
2020
- uses: actions/checkout@v5
2121
- name: Set up Python
22-
uses: actions/setup-python@v5
22+
uses: actions/setup-python@v6
2323
with:
24-
python-version: "3.10"
24+
python-version-file: "pyproject.toml"
2525
# Issue ref: https://github.com/actions/setup-python/issues/436
2626
# cache: "pip"
2727
# cache-dependency-path: pyproject.toml
@@ -36,9 +36,7 @@ jobs:
3636
- name: Install test dependencies
3737
run: |
3838
cd dist/fastapi_cloud_cli*/
39-
pip install -r requirements-tests.txt
40-
env:
41-
TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
39+
pip install --group dev .
4240
- name: Run source distribution tests
4341
run: |
4442
cd dist/fastapi_cloud_cli*/

.github/workflows/test.yml

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -23,55 +23,63 @@ on:
2323

2424
jobs:
2525
test:
26-
runs-on: ubuntu-latest
2726
strategy:
2827
matrix:
29-
python-version:
30-
- "3.8"
31-
- "3.9"
32-
- "3.10"
33-
- "3.11"
34-
- "3.12"
28+
os: [ ubuntu-latest, macos-latest, windows-latest ]
29+
python-version: ["3.14"]
30+
uv-resolution:
31+
- highest
32+
include:
33+
- python-version: "3.10"
34+
os: ubuntu-latest
35+
uv-resolution: lowest-direct
36+
- python-version: "3.11"
37+
os: macos-latest
38+
uv-resolution: lowest-direct
39+
- python-version: "3.12"
40+
os: windows-latest
41+
uv-resolution: highest
42+
- python-version: "3.13"
43+
os: macos-latest
44+
uv-resolution: lowest-direct
3545
fail-fast: false
46+
runs-on: ${{ matrix.os }}
47+
env:
48+
UV_PYTHON: ${{ matrix.python-version }}
49+
UV_RESOLUTION: ${{ matrix.uv-resolution }}
3650
steps:
3751
- name: Dump GitHub context
3852
env:
3953
GITHUB_CONTEXT: ${{ toJson(github) }}
4054
run: echo "$GITHUB_CONTEXT"
4155
- uses: actions/checkout@v5
4256
- name: Set up Python
43-
uses: actions/setup-python@v5
57+
uses: actions/setup-python@v6
4458
with:
4559
python-version: ${{ matrix.python-version }}
4660
# Issue ref: https://github.com/actions/setup-python/issues/436
4761
# cache: "pip"
4862
# cache-dependency-path: pyproject.toml
49-
- uses: actions/cache@v4
50-
id: cache
51-
with:
52-
path: ${{ env.pythonLocation }}
53-
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}
63+
- name: Install uv
64+
uses: astral-sh/setup-uv@v7
5465
# Allow debugging with tmate
5566
- name: Setup tmate session
5667
uses: mxschmitt/action-tmate@v3
5768
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
5869
with:
5970
limit-access-to-actor: true
6071
- name: Install Dependencies
61-
if: steps.cache.outputs.cache-hit != 'true'
62-
run: pip install -r requirements-tests.txt
63-
- name: Lint
64-
run: bash scripts/lint.sh
72+
run: uv sync --all-extras --dev
6573
- run: mkdir coverage
6674
- name: Test
67-
run: bash scripts/test.sh
75+
run: uv run --no-sync bash scripts/test.sh
6876
env:
6977
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
7078
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
7179
- name: Store coverage files
72-
uses: actions/upload-artifact@v4
80+
uses: actions/upload-artifact@v5
7381
with:
74-
name: coverage-${{ matrix.python-version }}
82+
name: coverage-${{ runner.os }}-${{ matrix.python-version }}
7583
path: coverage
7684
include-hidden-files: true
7785

@@ -84,29 +92,31 @@ jobs:
8492
GITHUB_CONTEXT: ${{ toJson(github) }}
8593
run: echo "$GITHUB_CONTEXT"
8694
- uses: actions/checkout@v5
87-
- uses: actions/setup-python@v5
95+
- uses: actions/setup-python@v6
8896
with:
89-
python-version: '3.8'
97+
python-version-file: "pyproject.toml"
9098
# Issue ref: https://github.com/actions/setup-python/issues/436
9199
# cache: "pip"
92100
# cache-dependency-path: pyproject.toml
101+
- name: Install uv
102+
uses: astral-sh/setup-uv@v7
93103
- name: Get coverage files
94104
uses: actions/download-artifact@v6
95105
with:
96106
pattern: coverage-*
97107
path: coverage
98108
merge-multiple: true
99-
- run: pip install coverage[toml]
109+
- run: uv sync --locked --all-extras --dev
100110
- run: ls -la coverage
101-
- run: coverage combine coverage
102-
- run: coverage report
103-
- run: coverage html --title "Coverage for ${{ github.sha }}"
111+
- run: uv run coverage combine coverage
112+
- run: uv run coverage html --title "Coverage for ${{ github.sha }}"
104113
- name: Store coverage HTML
105-
uses: actions/upload-artifact@v4
114+
uses: actions/upload-artifact@v5
106115
with:
107116
name: coverage-html
108117
path: htmlcov
109118
include-hidden-files: true
119+
- run: uv run coverage report --fail-under=100
110120

111121
# https://github.com/marketplace/actions/alls-green#why
112122
check: # This job does nothing and is only used for the branch protection

.pre-commit-config.yaml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# See https://pre-commit.com for more information
22
# See https://pre-commit.com/hooks.html for more hooks
3-
default_language_version:
4-
python: python3.10
53
repos:
64
- repo: https://github.com/pre-commit/pre-commit-hooks
75
rev: v4.6.0
@@ -13,13 +11,25 @@ repos:
1311
- --unsafe
1412
- id: end-of-file-fixer
1513
- id: trailing-whitespace
16-
- repo: https://github.com/astral-sh/ruff-pre-commit
17-
rev: v0.12.0
14+
- repo: local
1815
hooks:
19-
- id: ruff
20-
args:
21-
- --fix
22-
- id: ruff-format
23-
ci:
24-
autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
25-
autoupdate_commit_msg: ⬆ [pre-commit.ci] pre-commit autoupdate
16+
- id: local-ruff-check
17+
name: ruff check
18+
entry: uv run ruff check --force-exclude --fix --exit-non-zero-on-fix
19+
require_serial: true
20+
language: unsupported
21+
types: [python]
22+
23+
- id: local-ruff-format
24+
name: ruff format
25+
entry: uv run ruff format --force-exclude --exit-non-zero-on-format
26+
require_serial: true
27+
language: unsupported
28+
types: [python]
29+
30+
- id: local-mypy
31+
name: mypy check
32+
entry: uv run mypy src tests
33+
require_serial: true
34+
language: unsupported
35+
pass_filenames: false

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10

0 commit comments

Comments
 (0)