diff --git a/.github/workflows/python-package.yaml b/.github/workflows/python-package.yaml new file mode 100644 index 0000000..9a5cbb4 --- /dev/null +++ b/.github/workflows/python-package.yaml @@ -0,0 +1,39 @@ +name: Python package + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build-python: + + runs-on: [ubuntu-latest, windows-latest, macos-latest] + strategy: + fail-fast: false + matrix: + python-version: ["3.11", "3.12", "3.13"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install Act dependencies + if: ${{ env.ACT }} + run: | + apt-get update && apt-get install sudo -y cargo + - name: Install python dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Build rust package + run: | + maturin build + python -m pip install target/wheels/*.whl + - name: Test with pytest + run: | + pytest