Merge pull request #3 from ericpre/doc_build #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
env: | |
PYTHON_VERSION: '3.11' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Display version | |
run: | | |
python --version | |
pip --version | |
- name: Install pypa/build pypa/twine | |
run: | | |
pip install build twine | |
- name: Build a binary wheel and a source tarball | |
run: | | |
python -m build | |
- name: Display content dist folder | |
run: | | |
ls -l dist/ | |
- name: Run twin check | |
run: | | |
twine check dist/* | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./dist/* | |
name: dist | |
test: | |
name: Test Packaging | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
PYTHON_VERSION: '3.11' | |
steps: | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- uses: actions/download-artifact@v3 | |
- name: Display content working folder | |
run: | | |
ls -R | |
- name: Install distribution | |
run: | | |
pip install --pre --find-links dist exspy[tests] | |
- name: Test distribution | |
run: | | |
pytest --pyargs exspy |