name: CI on: pull_request: push: branches: - master jobs: build: runs-on: ubuntu-latest defaults: run: working-directory: python/vespa steps: - uses: actions/checkout@v1 - uses: actions/setup-python@v1 with: python-version: '3.7' architecture: 'x64' - name: Install the library run: | pip install pytest pip install -e . - name: Test with pytest run: | pytest - name: Build and publish if: github.event_name == 'push' && github.ref == 'refs/heads/master' env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.test_pypi_password }} run: | python -m pip install --upgrade pip pip install setuptools wheel twine python setup.py sdist bdist_wheel twine upload --repository testpypi dist/*