Fix cross reference #10
Workflow file for this run
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: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 0' | |
pull_request: | |
types: [labeled, ready_for_review, reopened] | |
jobs: | |
build: | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'run-packaging') || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }} | |
name: Build | |
runs-on: ubuntu-latest | |
env: | |
PYTHON_VERSION: '3.11' | |
steps: | |
- uses: actions/checkout@v4 | |
- 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 | |
run: | | |
pip install build | |
- name: Build a binary wheel and a source tarball | |
run: | | |
python -m build | |
- name: Display content dist folder | |
run: | | |
ls -shR 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 hyperspy[all,tests] | |
- name: Pip list | |
run: | | |
pip list | |
- name: Test distribution | |
run: | | |
pytest --pyargs hyperspy --reruns 3 -n 2 |