Move the pytest fixtures to conftest #65
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: aioipfs-build | |
on: | |
push: | |
branches: [ master, devel, ci, kubo, car ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build '.[car,test]' | |
- name: Fetch kubo (win) | |
uses: engineerd/configurator@v0.0.8 | |
if: startsWith(matrix.os, 'windows') | |
with: | |
name: ipfs.exe | |
url: "https://dist.ipfs.tech/kubo/v0.26.0/kubo_v0.26.0_windows-amd64.zip" | |
pathInArchive: "kubo/ipfs.exe" | |
- name: Fetch kubo (linux) | |
uses: engineerd/configurator@v0.0.8 | |
if: startsWith(matrix.os, 'ubuntu') | |
with: | |
name: ipfs | |
url: "https://dist.ipfs.tech/kubo/v0.26.0/kubo_v0.26.0_linux-amd64.tar.gz" | |
pathInArchive: "kubo/ipfs" | |
- name: Fetch kubo (macos) | |
uses: engineerd/configurator@v0.0.8 | |
if: startsWith(matrix.os, 'macos') | |
with: | |
name: ipfs | |
url: "https://dist.ipfs.tech/kubo/v0.26.0/kubo_v0.26.0_darwin-amd64.tar.gz" | |
pathInArchive: "kubo/ipfs" | |
- name: Test with pytest | |
run: | | |
pytest -v -s tests | |
- name: Build wheel | |
run: | | |
python -m build | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Build wheel | |
run: | | |
python -m pip install --upgrade pip | |
pip install build '.[car,test]' | |
python -m build | |
- name: Upload to PyPI | |
if: contains(toJson(github.event.commits), '[pypi-deploy]') == true | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
pip install twine | |
twine check dist/*.whl |