Merge pull request #167 from philrhc/upload-artifact-v4 #16
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: Test on push or pull request | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: 3.7 | |
- name: Build source package | |
run: | | |
pip install build | |
python -m build --sdist . | |
- name: Upload source package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: distribution | |
path: dist/ | |
run_tests: | |
name: "Run tests" | |
needs: [build_sdist] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
max-parallel: 1 # tests interfere with each other if run in parallel | |
matrix: | |
# order matters - this setup minimizes the interference between jobs | |
python-version: [3.8, 3.9] | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: distribution | |
path: dist/ | |
- name: Install dependencies | |
shell: bash # enables file pattern matching on Windows | |
run: | | |
python -m pip install --upgrade pip | |
pip install nose | |
pip install dist/zeromq-pyre-*.tar.gz | |
- name: Test with nose | |
working-directory: tests | |
run: python -m nose -v --exe |