Skip to content

Commit

Permalink
Build and upload without testing to reduce insecure pip usage.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 598605379
Change-Id: I5f692d38e03cafe448eb61a405984a2b488483be
  • Loading branch information
jagapiou authored and copybara-github committed Jan 15, 2024
1 parent e0d1790 commit d6847dc
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ on:
types: [published]
workflow_dispatch:
inputs:
test_sdist:
description: 'Test the sdist before uploading'
type: boolean
default: true
upload_to_test_pypi:
description: 'Upload to Test PyPi'
type: boolean
Expand All @@ -37,27 +33,8 @@ jobs:
- name: Checkout Melting Pot
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- name: Set up Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
with:
python-version: '3.11'

- name: Build source distribution
run: |
pip install build==1.0.3
python -m build --sdist --outdir dist/
- name: Test source distribution
if: github.event_name == 'release' || inputs.test_sdist
run: |
VENV="$(mktemp --dry-run)"
python -m venv "${VENV}"
source "${VENV}/bin/activate"
pip install dist/*.tar.gz
pip install pytest-xdist
pytest -n auto -rax --pyargs meltingpot
deactivate
rm -rf "${VENV}"
run: python setup.py sdist

- name: Publish to TestPyPI
if: github.event_name == 'release' || inputs.upload_to_test_pypi
Expand Down

0 comments on commit d6847dc

Please sign in to comment.