Skip to content

Commit

Permalink
fix(ci): test
Browse files Browse the repository at this point in the history
  • Loading branch information
ssut committed Nov 23, 2024
1 parent 15ecbc0 commit 17b0ffd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,28 @@ on:
- pull_request

jobs:
build:
test:
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install the project
run: uv sync --all-extras --dev
- name: Test with tox
run: uv run tox
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "requirements**.txt"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --all-extras --dev
- name: Run tests with coverage
run: |
uv run python -m pytest --cov=googletrans --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
fail_ci_if_error: true
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ classifiers = [
]

[project.optional-dependencies]
dev = ["pytest", "pytest-asyncio", "coveralls", "ruff>=0.7"]
dev = ["pytest", "pytest-asyncio", "pytest-cov", "ruff>=0.7"]

[tool.uv]
dev-dependencies = ["pytest", "pytest-asyncio", "ruff>=0.7"]
dev-dependencies = ["pytest", "pytest-asyncio", "pytest-cov", "ruff>=0.7"]

[project.scripts]
translate = "googletrans:translate"
Expand Down

0 comments on commit 17b0ffd

Please # to comment.