From 3f9c7f0f9bd595fd167f3b7e8c70a9c7d4e4b279 Mon Sep 17 00:00:00 2001 From: Harrison Wright Date: Fri, 3 Mar 2023 13:47:03 -0600 Subject: [PATCH] Use github actions for test matrix (#11) * try github actions out * try click version matrix * Python 3.4+ * 3.8+ * add 3.7 * try 3.4 on 20.04 * 3.6 * try a different matrix * why wont this run * test actions again * add more versions * 8.1.4 is not relased yet * add more versions * iterate... * Add a py2 version * add more versions * update readme * Fix click-version typo --- .github/workflows/build.yaml | 48 ++++++++++++++++++++++++++++++++++++ README.md | 4 ++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..08136d2 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,48 @@ +name: build and test + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + + python-version: [ + # "3.6", # TODO: Error: The version '3.6' with architecture 'x64' was not found for Ubuntu 22.04. + "3.7", + "3.8", + "3.9", + "3.10", + "3.11" + ] + click-version: [ + "5.1", + "6.7", + "7.0", + "7.1.2", + "8.0.4", + "8.1.3", + ] + exclude: + # click 8.1 drops support for py36 + - python-version: "3.6" + click-version: "8.1.3" + + + 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 package + run: | + python -m pip install --upgrade pip + pip install click==${{ matrix.click-version }} + python setup.py install + - name: Verify click version + run: pip freeze click + - name: Run tests + run: python -m unittest discover -v diff --git a/README.md b/README.md index 20c1775..1007cf9 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ Installation pip install click-command-tree ``` -Tested against Python 3.4, 3.5, and 3.6 and click >= 5.0 +This is tested against Python versions 3.7 - 3.11 and (latest major release) click versions +5.x, 6.x, 7.x, 7.1.x, 8.0.x, and 8.1.x. + Example -------