diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1285f9a..9889ca7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,19 +19,21 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup Python ${{ matrix.python-version}} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} + - name: Install Rye + run: | + curl -sSf https://rye.astral.sh/get | RYE_INSTALL_OPTION="--yes" bash + echo "$HOME/.rye/shims" >> $GITHUB_PATH - - name: Install dependencies - run: pip install -e . pytest pytest-cov ruff + - name: Install Python ${{ matrix.python-version }} & dependencies + run: | + rye pin ${{ matrix.python-version }} + rye sync --update-all --all-features - name: Run ruff lint check - run: ruff check --diff + run: rye run ruff check --diff - name: Run ruff format check - run: ruff format --check --diff + run: rye run ruff format --check --diff - name: Run pytest - run: pytest + run: rye run pytest diff --git a/.github/workflows/publish_mkdocs.yml b/.github/workflows/publish_mkdocs.yml index 8732bb1..2399819 100644 --- a/.github/workflows/publish_mkdocs.yml +++ b/.github/workflows/publish_mkdocs.yml @@ -12,15 +12,13 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup Python 3.11 - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - - name: Install MkDocs & Plugins + - name: Install Rye run: | - pip install . - pip install mkdocs mkdocs-material mkdocs-jupyter mkdocstrings[python] black + curl -sSf https://rye.astral.sh/get | RYE_INSTALL_OPTION="--yes" bash + echo "$HOME/.rye/shims" >> $GITHUB_PATH + + - name: Install Python & MkDocs & Plugins + run: rye sync - name: Publish document - run: mkdocs gh-deploy --force + run: rye run mkdocs gh-deploy --force diff --git a/.github/workflows/publish_to_pypi.yml b/.github/workflows/publish_to_pypi.yml index 2bb8587..24e3ab7 100644 --- a/.github/workflows/publish_to_pypi.yml +++ b/.github/workflows/publish_to_pypi.yml @@ -15,18 +15,13 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup Python 3.11 - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - - name: Install Poetry + - name: Install Rye run: | - curl -sSL https://install.python-poetry.org | python3 - - echo "$HOME/.local/bin" >> $GITHUB_PATH + curl -sSf https://rye.astral.sh/get | RYE_INSTALL_OPTION="--yes" bash + echo "$HOME/.rye/shims" >> $GITHUB_PATH - name: Build - run: poetry build + run: rye build - name: Publish - run: poetry publish -u $PYPI_USERNAME -p $PYPI_PASSWORD + run: rye publish -u $PYPI_USERNAME --token $PYPI_PASSWORD -y