Skip to content

Commit bdc90eb

Browse files
committed
Update gh actions workflow
1 parent 4d130c6 commit bdc90eb

File tree

3 files changed

+28
-38
lines changed

3 files changed

+28
-38
lines changed

.github/workflows/ci.yml

+14-17
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,26 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [ubuntu-latest, macos-latest]
17-
python-version: ["3.8", "3.9", "3.10", "3.11"]
17+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121

22-
- name: Setup Python ${{ matrix.python-version}}
23-
uses: actions/setup-python@v4
24-
with:
25-
python-version: ${{ matrix.python-version }}
26-
27-
- name: Install Poetry
22+
- name: Install Rye
2823
run: |
29-
curl -sSL https://install.python-poetry.org | python3 -
30-
echo "$HOME/.local/bin" >> $GITHUB_PATH
31-
32-
- name: Install Dependencies
33-
run: poetry install -n
24+
curl -sSf https://rye.astral.sh/get | RYE_INSTALL_OPTION="--yes" bash
25+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
3426
35-
- name: Run black format check
36-
run: poetry run black src tests --check --diff --verbose
27+
- name: Setup Python ${{matrix.python-version}} & Dependencies
28+
run: |
29+
rye pin ${{ matrix.python-version }}
30+
rye sync --update-all --all-features
3731
3832
- name: Run ruff lint check
39-
run: poetry run ruff .
33+
run: rye run ruff check --diff
34+
35+
- name: Run ruff format check
36+
run: rye run ruff format --check --diff
4037

4138
- name: Run pytest
42-
run: poetry run pytest tests --tb=line --cov=src --cov-report=xml --cov-report=term
39+
run: rye run pytest

.github/workflows/publish_mkdocs.yml

+8-10
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,15 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414

15-
- name: Setup Python 3.9
16-
uses: actions/setup-python@v4
17-
with:
18-
python-version: 3.9
19-
20-
- name: Install MkDocs & Plugins
15+
- name: Install Rye
2116
run: |
22-
pip install .
23-
pip install mkdocs mkdocs-material mkdocs-jupyter mkdocstrings[python] black
17+
curl -sSf https://rye.astral.sh/get | RYE_INSTALL_OPTION="--yes" bash
18+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
19+
20+
- name: Install Python & MkDocs & Plugins
21+
run: rye sync
2422

2523
- name: Publish document
26-
run: mkdocs gh-deploy --force
24+
run: rye run mkdocs gh-deploy --force

.github/workflows/publish_to_pypi.yml

+6-11
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,15 @@ jobs:
1313
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717

18-
- name: Setup Python 3.9
19-
uses: actions/setup-python@v4
20-
with:
21-
python-version: 3.9
22-
23-
- name: Install Poetry
18+
- name: Install Rye
2419
run: |
25-
curl -sSL https://install.python-poetry.org | python3 -
26-
echo "$HOME/.local/bin" >> $GITHUB_PATH
20+
curl -sSf https://rye.astral.sh/get | RYE_INSTALL_OPTION="--yes" bash
21+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
2722
2823
- name: Build
29-
run: poetry build
24+
run: rye build
3025

3126
- name: Publish
32-
run: poetry publish -u $PYPI_USERNAME -p $PYPI_PASSWORD
27+
run: rye publish -u $PYPI_USERNAME --token $PYPI_PASSWORD -y

0 commit comments

Comments
 (0)