From 0987712671fc1f0df1da165f2a48c0f02d2dfc25 Mon Sep 17 00:00:00 2001 From: John Agapiou Date: Wed, 20 Mar 2024 02:34:24 +0000 Subject: [PATCH] Create sdist-test.yml --- .github/workflows/sdist-test.yml | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/sdist-test.yml diff --git a/.github/workflows/sdist-test.yml b/.github/workflows/sdist-test.yml new file mode 100644 index 00000000..24485f07 --- /dev/null +++ b/.github/workflows/sdist-test.yml @@ -0,0 +1,39 @@ +# A workflow to test the sdist that will be released to PyPI + +name: sdist-test + +on: + workflow_dispatch: + +permissions: read-all + +jobs: + sdist-test: + name: Test sdist + runs-on: ubuntu-latest + timeout-minutes: 90 + + steps: + - name: Checkout Melting Pot + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + + - name: Build source distribution + run: python setup.py sdist + + - name: Set up Python + uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c + with: + python-version: '3.11' + + - name: Install Python dependencies + run: | + pip install --upgrade pip + pip install pytest-xdist setuptools + + - name: Install source distribution + run: | + pip install dist/*.tar.gz + + - name: Test source distribution + run: | + pytest -n auto --pyargs meltingpot