From 794352bf70555dcdf1f73f0ba46c757a9246b652 Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Thu, 22 Aug 2024 06:44:00 -0600 Subject: [PATCH] ci: add tests --- .github/workflows/build.yml | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 597c5ba..8f77269 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build Python bindings +name: Build and test Python bindings on: push: @@ -11,27 +11,51 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: "pip" - uses: PyO3/maturin-action@v1 with: maturin-version: 1.6.0 manylinux: 2014 command: build args: --release --sdist -i python3.12 + - name: Install startinpy + run: pip install . + - name: Install test requirements + run: pip install -r tests/requirements.txt + - name: Run tests + run: pytest windows: runs-on: windows-latest steps: - uses: actions/checkout@v2 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: "pip" - uses: PyO3/maturin-action@v1 with: maturin-version: 1.6.0 command: build args: --release --sdist -i python3.12 + - name: Install startinpy + run: pip install . + - name: Install test requirements + run: pip install -r tests/requirements.txt + - name: Run tests + run: pytest macos: runs-on: macos-latest steps: - uses: actions/checkout@v2 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: "pip" - name: Install aarch64-apple-darwin toolchain uses: actions-rs/toolchain@v1 with: @@ -42,3 +66,9 @@ jobs: maturin-version: 1.6.0 command: build args: --release --sdist -i python3.12 + - name: Install startinpy + run: pip install . + - name: Install test requirements + run: pip install -r tests/requirements.txt + - name: Run tests + run: pytest