From 89d895baacfdeaaeba1b7f007430efdc01633bbf Mon Sep 17 00:00:00 2001 From: hell Date: Thu, 3 Sep 2026 23:11:16 +0700 Subject: [PATCH] ci: run the unittest suite on push and pull requests The repository already ships 70 stdlib unittest cases under tests/, but .github/workflows/build.yml only builds PyInstaller binaries and images, so a regression never fails a PR. This adds a tiny Tests workflow that installs requirements.txt and runs `python -m unittest discover -s tests` on pushes to main, on every pull request and on demand. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/test.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 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..81d919c --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,30 @@ +name: Tests + +on: + push: + branches: [ "main" ] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + unittest: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Run unit tests + run: python -m unittest discover -s tests -v