File tree Expand file tree Collapse file tree 3 files changed +34
-65
lines changed
Expand file tree Collapse file tree 3 files changed +34
-65
lines changed Original file line number Diff line number Diff line change @@ -13,23 +13,33 @@ jobs:
1313 python-version : ["3.9", "3.10", "3.11", "3.12"]
1414
1515 steps :
16- - uses : actions/checkout@v3
16+ - uses : actions/checkout@v4
1717
1818 - name : Set up Python ${{ matrix.python-version }}
19- uses : actions/setup-python@v2
19+ uses : actions/setup-python@v5
2020 with :
2121 python-version : ${{ matrix.python-version }}
2222
23+ - name : Install the latest version of rye
24+ uses : eifinger/setup-rye@v4
25+ id : setup-rye
26+ with :
27+ enable-cache : true
28+ cache-prefix : ${{ matrix.python-version }}
29+
30+ - name : Pin python-version ${{ matrix.python-version }}
31+ if : steps.setup-rye.outputs.cache-hit != 'true'
32+ run : rye pin ${{ matrix.python-version }}
33+
2334 - name : Install dependencies
35+ if : steps.setup-rye.outputs.cache-hit != 'true'
2436 run : |
25- python -m pip install --upgrade pip
26- pip install tox
37+ rye sync --no-lock
2738
2839 - name : Generate API
2940 run : |
30- make venv
31- make api
41+ rye run api
3242
3343 - name : Run tests
3444 run : |
35- tox
45+ rye run python -m pytest
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -178,3 +178,20 @@ showcontent = true
178178directory = " misc"
179179name = " Misc"
180180showcontent = true
181+
182+ [tool .rye .scripts ]
183+ clean = { chain = [" clean:docs" , " clean:api" ] }
184+ "clean:api" = { cmd = " rm -rf hydrogram/errors/exceptions hydrogram/raw/all.py hydrogram/raw/base hydrogram/raw/functions hydrogram/raw/types" }
185+ "clean:docs" = { cmd = " rm -rf docs/build docs/source/api/bound-methods docs/source/api/methods docs/source/api/types docs/source/telegram" }
186+
187+ api = { chain = [" api:raw" , " api:errors" ] }
188+ "api:raw" = { call = " compiler.api.compiler:start" }
189+ "api:errors" = { call = " compiler.errors.compiler:start" }
190+
191+ docs = { chain = [" docs:compile" , " docs:serve" ] }
192+ "docs:compile" = { cmd = " python compiler/docs/compiler.py" }
193+ "docs:serve" = { cmd = " sphinx-build -b html docs/source docs/build/html -j auto" }
194+ live-docs = { cmd = " sphinx-autobuild docs/source docs/build/html -j auto --watch src" }
195+
196+ towncrier = { cmd = " towncrier build --yes" }
197+ towncrier-draft = { cmd = " towncrier build --draft" }
You can’t perform that action at this time.
0 commit comments