From 2a4033389586a494f88d1b7701b7507bdc407540 Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Mon, 16 Sep 2024 11:11:37 +0200 Subject: [PATCH] Test build in CI. --- .github/workflows/build.yaml | 24 +----------------------- .github/workflows/ci.yaml | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7fe331c..6131c97 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,31 +4,9 @@ on: types: - published -name: Build +name: release jobs: - python-build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-python@v4 - name: Install Python - with: - python-version: '3.10' - - - name: Install build dependencies - run: python -m pip install build - - - name: Build source distribution and wheel - run: python -m build --sdist --wheel - - - uses: actions/upload-artifact@v3 - with: - name: wheels - path: dist/* - upload-testpypi: needs: [python-build] runs-on: ubuntu-latest diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1bc81c0..f7037a2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -55,3 +55,29 @@ jobs: python-version: "3.12" - name: Run pre-commit checks uses: pre-commit/action@v3.0.0 + + python-build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v4 + name: Install Python + with: + python-version: '3.10' + + - name: Install build dependencies + run: python -m pip install build + + - name: Build source distribution and wheel + run: python -m build --sdist --wheel + + - name: Test build + run: python -m pip install dist/*.whl + run: python -c "from ivmodels import KClass" + + - uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist/* \ No newline at end of file