From afb43662556da37271a95793aff7fd853ccb8082 Mon Sep 17 00:00:00 2001 From: FredB-mine Date: Thu, 3 Oct 2024 23:41:50 +0800 Subject: [PATCH 1/2] Add xeger to tox.ini so that tox can run properly --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index ed1e45d..28343b5 100644 --- a/tox.ini +++ b/tox.ini @@ -1,2 +1,3 @@ [testenv] commands=python unit_test.py +deps=xeger \ No newline at end of file From 3cd277e64466a2002dad041ffaa7669e08eb3231 Mon Sep 17 00:00:00 2001 From: AlfredChester Date: Fri, 4 Oct 2024 11:46:22 +0800 Subject: [PATCH 2/2] Synced tox.ini and workflows --- .github/workflows/test.yml | 25 +++++++++++++++++++++++++ .gitignore | 2 ++ tox.ini | 22 ++++++++++++++++++++-- 3 files changed, 47 insertions(+), 2 deletions(-) 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..5166c95 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,25 @@ +name: Python package + +on: + - push + - pull_request + +jobs: + build: + strategy: + matrix: + python-version: ["3.6", "3.8", "3.10", "3.12"] + platform: [ubuntu-20.04, windows-latest] + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v3 + - 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 + python -m pip install 'tox<4' tox-gh-actions + - name: Test with tox + run: tox \ No newline at end of file diff --git a/.gitignore b/.gitignore index 66d0bc3..e710e16 100644 --- a/.gitignore +++ b/.gitignore @@ -138,3 +138,5 @@ venv/ # VS Code .vscode + +.python-version \ No newline at end of file diff --git a/tox.ini b/tox.ini index 28343b5..3ecf41a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,3 +1,21 @@ +[tox] +envlist = py36, py37, py38, py39, py310, py311, py312 +requires = virtualenv < 20.22.0 +isolated_build = true + [testenv] -commands=python unit_test.py -deps=xeger \ No newline at end of file +deps = + xeger + colorful +commands = python unit_test.py +allowlist_externals = poetry + +[gh-actions] +python = + 3.6: py36 + 3.7: py37 + 3.8: py38 + 3.9: py39 + 3.10: py310 + 3.11: py311 + 3.12: py312 \ No newline at end of file