Skip to content

Commit

Permalink
install python by uv in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
lesnik512 committed Nov 12, 2024
1 parent ced67d6 commit 8fc4e45
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- run: uv python install 3.10
- run: just install lint-ci

pytest:
Expand All @@ -32,15 +33,15 @@ jobs:
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- run: uv python install ${{ matrix.python-version }}
- run: just install test . --cov=. --cov-report xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.0.1
- uses: codecov/codecov-action@v4.0.1
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions/cache@v4
with:
path: ~/.cache/uv
key: publish-${{ hashFiles('pyproject.toml') }}
- uses: extractions/setup-just@v2
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- run: just publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 8fc4e45

Please sign in to comment.