From 1cb2c5b3be7895615914a09d26da57b425504c9f Mon Sep 17 00:00:00 2001 From: John Agapiou Date: Tue, 19 Mar 2024 20:28:38 -0700 Subject: [PATCH] Add workflow to check sdist that will be released to PyPI. PiperOrigin-RevId: 617379409 Change-Id: I3a77ef1c18958e6bd44cb422b9ca5fe310f54520 --- .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