From 8feb6571095e5d293cf0074cda630e99fd64b049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=92=8B=E4=B9=90=E9=AA=8B?= <135497856+yjlc-pc@users.noreply.github.com> Date: Fri, 7 Jun 2024 14:17:03 +0800 Subject: [PATCH] Create python-package.yml --- .github/workflows/python-package.yml | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/python-package.yml diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000..34f4753 --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,29 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python package + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: debian-12.5 + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Test with pytest + run: | + pytest