From 0f39bc02dc92adfae7907c162f98233a30f167d6 Mon Sep 17 00:00:00 2001 From: Chih-Hsuan Yen <645432-yan12125@users.noreply.gitlab.com> Date: Sun, 4 Feb 2024 14:12:21 +0800 Subject: [PATCH 1/2] Run CI tests --- .github/workflows/test.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 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 00000000..277f0ddf --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,34 @@ +name: run tests + +on: [push, pull_request] + +jobs: + tests: + runs-on: ubuntu-latest + + # Use the base-devel image of Arch Linux for building pyalpm + container: archlinux:base-devel + + strategy: + fail-fast: false + matrix: + python-version: + - "3.10" + - "3.11" + - "3.12" + exclude: [] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Python deps + run: python -m pip install -U pytest pytest-asyncio nvchecker requests lxml PyYAML pyalpm structlog python_prctl + + - name: Run pytest + run: pytest From 53523d35168fec5cc2f82a5938be6f4b5307907d Mon Sep 17 00:00:00 2001 From: Chih-Hsuan Yen <645432-yan12125@users.noreply.gitlab.com> Date: Sun, 4 Feb 2024 20:44:48 +0800 Subject: [PATCH 2/2] Update supported Python versions Needs Python >= 3.10 as PEP 604 syntax is used extensively --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index bdbbbc9c..c3b2de5e 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ description = 'The build bot for archlinuxcn', author = 'lilydjwg', author_email = 'lilydjwg@gmail.com', - python_requires = '>=3.7.0', + python_requires = '>=3.10.0', url = 'https://github.com/archlinuxcn/lilac', zip_safe = False, packages = find_packages(exclude=('tests',)) + ['nvchecker_source'], @@ -25,7 +25,8 @@ classifiers = [ 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', ], )