From 8ec46d3222a015e3e2b615536583b6997d0904a5 Mon Sep 17 00:00:00 2001 From: Ou Ku Date: Fri, 13 Sep 2024 10:19:27 +0200 Subject: [PATCH] build action --- .github/build.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/build.yml diff --git a/.github/build.yml b/.github/build.yml new file mode 100644 index 0000000..28d82f5 --- /dev/null +++ b/.github/build.yml @@ -0,0 +1,36 @@ +# This workflow will install Python dependencies 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: Build + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] + python-version: ["3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install build + python -m pip install .[dev,docs,demo] + - name: Build the package + run: python -m build + - name: Test with pytest + run: python -m pytest