Skip to content

Workflow file for this run

name: Check that `sdist` builds and installs
on: [pull_request, push]
env:
apt_options: -o Acquire::Retries=3
jobs:
build_sdist:
name: Build sdist
runs-on: ubuntu-latest
# Run on external PRs, but not internal PRs as they'll be run by the push
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install requirements
run:
python -m pip install build
- name: Build a source tarball
run:
python -m build --sdist
- name: Test tarball
run: |
sudo apt-get ${{env.apt_options}} update -y
sudo apt-get ${{env.apt_options}} install -y libhdf5-dev
pip install -r tests/requirement_tests.txt
pip install dist/*
pytest -s -v tests