88
99env :
1010 DEFAULT_PYTHON : " 3.10"
11+ RUFF_VERSION : 0.14.10
12+ UV_VERSION : 0.9.18
1113
1214permissions :
1315 contents : read
1618 ruff :
1719 runs-on : ubuntu-latest
1820 steps :
19- - uses : actions/checkout@v3
21+ - uses : actions/checkout@v6
2022 - uses : chartboost/ruff-action@v1
23+ with :
24+ version : ${{ env.RUFF_VERSION }}
25+ # - uses: chartboost/ruff-action@v1
26+ # with:
27+ # args: "format --check"
28+ # version: ${{ env.RUFF_VERSION }}
2129
2230 black :
2331 runs-on : ubuntu-latest
@@ -35,14 +43,15 @@ jobs:
3543 - uses : actions/setup-python@v4
3644 with :
3745 python-version : ${{ env.DEFAULT_PYTHON }}
38- - name : Install dependencies
39- run : |
40- python -m pip install --upgrade pip
41- pip install -r requirements.txt
42- pip install -r requirements-dev.txt
46+ - name : Install uv
47+ uses : astral-sh/setup-uv@v7
48+ with :
49+ version : ${{ env.UV_VERSION }}
50+ - name : Install Requirements
51+ run : uv sync --frozen --all-extras
4352 - name : Run Pylint
4453 run : |
45- pylint --disable=too-many-positional-arguments office365
54+ uv run pylint --disable=too-many-positional-arguments office365
4655
4756 pytest :
4857 runs-on : ubuntu-latest
@@ -51,16 +60,13 @@ jobs:
5160 - black
5261 - pylint
5362 steps :
54- - uses : actions/checkout@v3
63+ - uses : actions/checkout@v6
5564 - name : Set up Python ${{ env.DEFAULT_PYTHON }}
56- uses : actions/setup-python@v3
65+ uses : actions/setup-python@v6
5766 with :
5867 python-version : ${{ env.DEFAULT_PYTHON }}
59- - name : Install dependencies
60- run : |
61- python -m pip install --upgrade pip
62- pip install -r requirements.txt
63- pip install -r requirements-dev.txt
68+ - name : Install Requirements
69+ run : uv sync --frozen --all-extras
6470 - name : Test with pytest (skip entirely if secrets missing)
6571 env :
6672 office365_python_sdk_securevars : ${{ secrets.OFFICE365_PYTHON_SDK_SECUREVARS }}
6975 echo "No secrets available; skipping pytest"; \
7076 exit 0; \
7177 else \
72- pytest; \
78+ uv run pytest; \
7379 fi
0 commit comments