diff --git a/.github/workflows/linting.yaml b/.github/workflows/linting.yaml index baa780b..bbf348f 100644 --- a/.github/workflows/linting.yaml +++ b/.github/workflows/linting.yaml @@ -17,14 +17,10 @@ jobs: steps: - name: โคต๏ธ Check out code from GitHub uses: actions/checkout@v4.1.1 - - name: ๐Ÿ— Set up uv + - name: ๐Ÿ— Install uv and set the Python version ${{ env.DEFAULT_PYTHON }} uses: astral-sh/setup-uv@v7 - - name: ๐Ÿ— Set up Python ${{ env.DEFAULT_PYTHON }} - id: python - uses: actions/setup-python@v5.0.0 with: python-version: ${{ env.DEFAULT_PYTHON }} - cache: "uv" - name: ๐Ÿ— Install Python dependencies run: uv sync - name: ๐Ÿš€ Run ruff linter @@ -38,14 +34,10 @@ jobs: steps: - name: โคต๏ธ Check out code from GitHub uses: actions/checkout@v4.1.1 - - name: ๐Ÿ— Set up uv + - name: ๐Ÿ— Install uv and set the Python version ${{ env.DEFAULT_PYTHON }} uses: astral-sh/setup-uv@v7 - - name: ๐Ÿ— Set up Python ${{ env.DEFAULT_PYTHON }} - id: python - uses: actions/setup-python@v5.0.0 with: python-version: ${{ env.DEFAULT_PYTHON }} - cache: "uv" - name: ๐Ÿ— Install Python dependencies run: uv sync - name: ๐Ÿš€ Check Python AST @@ -83,14 +75,10 @@ jobs: steps: - name: โคต๏ธ Check out code from GitHub uses: actions/checkout@v4.1.1 - - name: ๐Ÿ— Set up uv + - name: ๐Ÿ— Install uv and set the Python version ${{ env.DEFAULT_PYTHON }} uses: astral-sh/setup-uv@v7 - - name: ๐Ÿ— Set up Python ${{ env.DEFAULT_PYTHON }} - id: python - uses: actions/setup-python@v5.0.0 with: python-version: ${{ env.DEFAULT_PYTHON }} - cache: "uv" - name: ๐Ÿ— Install Python dependencies run: uv sync - name: ๐Ÿš€ Run pylint @@ -102,14 +90,10 @@ jobs: steps: - name: โคต๏ธ Check out code from GitHub uses: actions/checkout@v4.1.1 - - name: ๐Ÿ— Set up uv + - name: ๐Ÿ— Install uv and set the Python version ${{ env.DEFAULT_PYTHON }} uses: astral-sh/setup-uv@v7 - - name: ๐Ÿ— Set up Python ${{ env.DEFAULT_PYTHON }} - id: python - uses: actions/setup-python@v5.0.0 with: python-version: ${{ env.DEFAULT_PYTHON }} - cache: "uv" - name: ๐Ÿ— Install Python dependencies run: uv sync - name: ๐Ÿš€ Run yamllint @@ -121,14 +105,10 @@ jobs: steps: - name: โคต๏ธ Check out code from GitHub uses: actions/checkout@v4.1.1 - - name: ๐Ÿ— Set up uv + - name: ๐Ÿ— Install uv and set the Python version ${{ env.DEFAULT_PYTHON }} uses: astral-sh/setup-uv@v7 - - name: ๐Ÿ— Set up Python ${{ env.DEFAULT_PYTHON }} - id: python - uses: actions/setup-python@v5.0.0 with: python-version: ${{ env.DEFAULT_PYTHON }} - cache: "uv" - name: ๐Ÿ— Install Python dependencies run: uv sync - name: ๐Ÿ— Set up Node.js diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 0539722..1dedcb2 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -20,22 +20,14 @@ jobs: steps: - name: โคต๏ธ Check out code from GitHub uses: actions/checkout@v4.1.1 - - name: ๐Ÿ— Set up Poetry - run: pipx install poetry - - name: ๐Ÿ— Set up Python ${{ matrix.python }} - id: python - uses: actions/setup-python@v5.0.0 + - name: ๐Ÿ— Install uv and set the Python version ${{ env.DEFAULT_PYTHON }} + uses: astral-sh/setup-uv@v7 with: - python-version: ${{ matrix.python }} - cache: "poetry" - - name: ๐Ÿ— Install workflow dependencies - run: | - poetry config virtualenvs.create true - poetry config virtualenvs.in-project true + python-version: ${{ env.DEFAULT_PYTHON }} - name: ๐Ÿ— Install dependencies - run: poetry install --no-interaction + run: uv sync - name: ๐Ÿš€ Run pytest - run: poetry run pytest --cov=tadoasync tests --cov-fail-under=95 + run: uv run pytest --cov=tadoasync tests --cov-fail-under=95 - name: โฌ†๏ธ Upload coverage artifact uses: actions/upload-artifact@v4.3.1 with: @@ -53,26 +45,18 @@ jobs: fetch-depth: 0 - name: โฌ‡๏ธ Download coverage data uses: actions/download-artifact@v4.1.4 - - name: ๐Ÿ— Set up Poetry - run: pipx install poetry - - name: ๐Ÿ— Set up Python ${{ env.DEFAULT_PYTHON }} - id: python - uses: actions/setup-python@v5.0.0 + - name: ๐Ÿ— Install uv and set the Python version ${{ env.DEFAULT_PYTHON }} + uses: astral-sh/setup-uv@v7 with: python-version: ${{ env.DEFAULT_PYTHON }} - cache: "poetry" - - name: ๐Ÿ— Install workflow dependencies - run: | - poetry config virtualenvs.create true - poetry config virtualenvs.in-project true - name: ๐Ÿ— Install dependencies - run: poetry install --no-interaction + run: uv sync - name: ๐Ÿš€ Process coverage results run: | - poetry run coverage combine coverage*/.coverage* - poetry run coverage xml -i + uv run coverage combine coverage*/.coverage* + uv run coverage xml -i - name: โœ… Enforce minimum coverage (95%) - run: poetry run coverage report -m --fail-under=95 + run: uv run coverage report -m --fail-under=95 - name: ๐Ÿš€ Upload coverage report uses: codecov/codecov-action@v4.1.0 with: diff --git a/.github/workflows/typing.yaml b/.github/workflows/typing.yaml index 40c4c9d..62f779a 100644 --- a/.github/workflows/typing.yaml +++ b/.github/workflows/typing.yaml @@ -17,19 +17,11 @@ jobs: steps: - name: โคต๏ธ Check out code from GitHub uses: actions/checkout@v4.1.1 - - name: ๐Ÿ— Set up Poetry - run: pipx install poetry - - name: ๐Ÿ— Set up Python ${{ env.DEFAULT_PYTHON }} - id: python - uses: actions/setup-python@v5.0.0 + - name: ๐Ÿ— Install uv and set the Python version ${{ env.DEFAULT_PYTHON }} + uses: astral-sh/setup-uv@v7 with: python-version: ${{ env.DEFAULT_PYTHON }} - cache: "poetry" - - name: ๐Ÿ— Install workflow dependencies - run: | - poetry config virtualenvs.create true - poetry config virtualenvs.in-project true - name: ๐Ÿ— Install dependencies - run: poetry install --no-interaction + run: uv sync - name: ๐Ÿš€ Run mypy - run: poetry run mypy examples src tests + run: uv run mypy examples src tests