Skip to content

Commit

Permalink
python: port github python-test action from poetry to uv
Browse files Browse the repository at this point in the history
  • Loading branch information
reyammer committed Aug 30, 2024
1 parent e8ce823 commit c55e3a4
Showing 1 changed file with 13 additions and 19 deletions.
32 changes: 13 additions & 19 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,26 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4

- name: Setup Python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # pin@v5
with:
python-version: '${{ matrix.python-version }}'
- name: Install uv
run: curl -LsSf https://astral.sh/uv/0.4.0/install.sh | sh

- name: Install poetry
uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439 # pin@v3
with:
poetry-version: "1.7.1"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Install the project dependencies
working-directory: python
run: poetry install
- name: Install the project
run: uv sync --all-extras --dev

- name: Run ruff check
working-directory: python
run: poetry run ruff check --verbose
run: uv run ruff check --verbose

- name: Run ruff format check
working-directory: python
run: poetry run ruff format --check --verbose
run: uv run ruff format --check --verbose

- name: Run mypy
working-directory: python
run: poetry run mypy magika tests
# - name: Run mypy
# working-directory: python
# run: poetry run mypy magika tests

- name: Run pytest
working-directory: python
run: poetry run pytest tests -m "not slow"
- name: Run tests
run: uv run pytest tests -m "not slow"

0 comments on commit c55e3a4

Please sign in to comment.