diff --git a/.github/workflows/ci_workflow.yml b/.github/workflows/ci_workflow.yml index b1caea1..ca50cff 100644 --- a/.github/workflows/ci_workflow.yml +++ b/.github/workflows/ci_workflow.yml @@ -31,36 +31,23 @@ jobs: linting: runs-on: ubuntu-latest - env: - PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt steps: - uses: actions/checkout@v4 - - name: Install Poetry - run: | - pipx install poetry - poetry --version - - name: Set up Python ${{ matrix.python-version }} - id: setup-python - uses: actions/setup-python@v5 + - uses: actions/setup-python@v5 with: python-version: 3.x - cache: poetry - - name: Install dependencies - run: | - poetry env use ${{ steps.setup-python.outputs.python-path }} - poetry install + - uses: astral-sh/setup-uv@v3 + with: + version: ">=0.4.20" - name: Run lint command from tox.ini run: | - pipx run tox -e lint + uvx tox -e lint pytest: runs-on: ubuntu-latest - env: - CLIENT_SECRETS: ${{ secrets.GA_CLIENT_SECRETS }} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt strategy: + fail-fast: false matrix: python-version: - "3.8" @@ -72,19 +59,14 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install Poetry - run: | - pipx install poetry - poetry --version - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} allow-prereleases: true - cache: poetry - - name: Install dependencies - run: | - poetry install + - uses: astral-sh/setup-uv@v3 + with: + version: ">=0.4.20" - name: Test with pytest run: | - poetry run pytest --capture=no + uvx tox -e py diff --git a/.github/workflows/constraints.txt b/.github/workflows/constraints.txt deleted file mode 100644 index 85cdce6..0000000 --- a/.github/workflows/constraints.txt +++ /dev/null @@ -1,2 +0,0 @@ -pip==24.2 -poetry==1.8.4 diff --git a/README.md b/README.md index 39bbe35..1ca7a64 100644 --- a/README.md +++ b/README.md @@ -114,8 +114,7 @@ Create tests within the `tap_csv/tests` subfolder and then run: ```bash -poetry run tox -poetry run tox -e pytest +poetry run tox -e py313 poetry run tox -e format poetry run tox -e lint ``` diff --git a/pyproject.toml b/pyproject.toml index 4d6657e..915fb06 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ ruff = ">=0.1.15" types-requests = ">=2.31.0" [build-system] -requires = ["poetry-core==1.9.0"] +requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" [tool.poetry.scripts] diff --git a/tox.ini b/tox.ini index 4694ab8..65156f6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,35 +1,33 @@ # This file can be used to customize tox tests as well as other test frameworks like flake8 and mypy [tox] -envlist = py38 -; envlist = py37, py38, py39 +envlist = py3{8,9,10,11,12,13}, format, lint isolated_build = true [testenv] -allowlist_externals = poetry - -[testenv:pytest] -# Run the python tests. -# To execute, run `tox -e pytest` -envlist = py38, py39, py310, py311, py312 +deps = + coverage + pytest commands = - poetry install -v - poetry run coverage run -m pytest - poetry run coverage html -d tap_csv/tests/codecoverage + coverage run -m pytest + coverage html -d tap_csv/tests/codecoverage [testenv:format] # Attempt to auto-resolve lint errors before they are raised. # To execute, run `tox -e format` +deps = + ruff commands = - poetry install -v - poetry run ruff check --fix tap_csv/ - poetry run ruff format tap_csv + ruff check --fix tap_csv/ + ruff format tap_csv [testenv:lint] # Raise an error if lint and style standards are not met. # To execute, run `tox -e lint` +deps = + ruff + mypy commands = - poetry install -v - poetry run ruff check --diff tap_csv/ - poetry run ruff format --check tap_csv - poetry run mypy tap_csv --exclude='tap_csv/tests' --ignore-missing-imports + ruff check --diff tap_csv/ + ruff format --check tap_csv + mypy tap_csv --exclude='tap_csv/tests' --ignore-missing-imports