diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..53f34f5 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..031c44d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: CI + +on: + pull_request: + push: + branches: + - main + workflow_dispatch: + +jobs: + ci: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.11"] + steps: + - name: Setup Git + run: | + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "github-actions" + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Rye + uses: eifinger/setup-rye@v1 + with: + enable-cache: true + - name: Pin Python Version + run: rye pin ${{ matrix.python-version }} + - name: Sync Rye + run: rye sync + - name: Run Tests + run: rye run pytest diff --git a/.python-version b/.python-version index 12398d7..9ac3804 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -cpython@3.11.3 +3.11.5 diff --git a/pyproject.toml b/pyproject.toml index 26fd474..ab2cb1d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ dependencies = [ "pytest-copier>=0.1.0", ] readme = "README.md" -requires-python = ">= 3.8" +requires-python = ">= 3.10" [build-system] requires = ["hatchling"] diff --git a/tests/test_project_generation.py b/tests/test_project_generation.py index a79adc9..cd9c482 100644 --- a/tests/test_project_generation.py +++ b/tests/test_project_generation.py @@ -19,17 +19,19 @@ def _check_contents( def test_default_values(copier_fixture: CopierFixture): copied = copier_fixture.copy() - assert copied.exit_code == 0 + print(copied.directory) + print(copied.exc) + print(copied.exit_code) project_path = copied.project_path + print(project_path) agent = copied.agent + assert copied.exit_code == 0 assert (project_path / f"src/{agent.answers.user['package_name']}").exists() env_file = ( (project_path / f"src/{agent.answers.user['package_name']}/.env") .read_text() .strip() ) - print(copied.get_config) - print(env_file) assert f"session={copied.get_config['session_cookie']}" in env_file _check_contents( project_path / "README.md",