Skip to content

Commit

Permalink
Merge pull request #2 from baurt/workflows
Browse files Browse the repository at this point in the history
github actions
  • Loading branch information
TillerBurr authored Aug 29, 2023
2 parents bdfbfbc + 5ac124f commit c95efb6
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cpython@3.11.3
3.11.5
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
8 changes: 5 additions & 3 deletions tests/test_project_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit c95efb6

Please sign in to comment.