From e3f2dfc0e687df42e57165fdb4816651c97827b8 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 15 Oct 2025 17:03:25 +0300 Subject: [PATCH 1/4] Add GitHub Actions workflow for tests --- .github/workflows/test.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b7814b2 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,36 @@ +name: Test + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.7", "3.12"] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -e .[dev] + + - name: Test with pytest + run: | + pytest tests/ -v --tb=short + + - name: Test CLI command + run: | + draw_tree --help \ No newline at end of file From b8d971c341a056cc39692e26c59089b07f3a4c0b Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 15 Oct 2025 17:07:18 +0300 Subject: [PATCH 2/4] 3.9 as minimum Python version in README and GitHub Actions --- .github/workflows/test.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b7814b2..a15973c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index 0f43748..08559fe 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ pip install -e . ## Requirements -- Python 3.7+ (tested on 3.13) +- Python 3.9+ (tested on 3.13) - LaTeX with TikZ (for PDF/PNG generation) - (optional) ImageMagick or Ghostscript or Poppler (for PNG generation) From ddb2ea78c30c24df19c9d43caff094d31dc30346 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 15 Oct 2025 17:08:53 +0300 Subject: [PATCH 3/4] =?UTF-8?q?just=20do=203.9=20and=20=C2=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a15973c..d5c3ffc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.13"] steps: - uses: actions/checkout@v4 From 714bd30c7885ce0ff09a94be7cce5527cf0dd549 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 15 Oct 2025 17:11:01 +0300 Subject: [PATCH 4/4] Update CLI command test to run without help flag --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d5c3ffc..fc65c28 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,4 +33,4 @@ jobs: - name: Test CLI command run: | - draw_tree --help \ No newline at end of file + draw_tree \ No newline at end of file