Skip to content

fix tests

fix tests #9

name: Test Publish to PYPI
on:
push:
branches:
- main
pull_request:
jobs:
build-n-publish:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v2
- run: pip install poetry
- name: Set poetry version to dev
run: |
build_version="$(poetry version -s).dev$(date +%s)"
poetry version $build_version
- run: poetry build
- run: pip install dist/*gz --force-reinstall
- run: pip install nbmake nbformat nbclient # necessary for running smoke test
- run: nbwrite tests/resources/nbwrite-in/minimal.yaml
env:
OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}'
- run: pip install dist/*whl --force-reinstall
- run: nbwrite tests/resources/nbwrite-in/example.yaml
env:
OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}'
- run: pip install twine==4.0.1
- run: twine upload -r testpypi dist/* -u __token__ -p ${{ secrets.TEST_PYPI_API_TOKEN }}