Skip to content

SDK update: Add knowledgebase #281

SDK update: Add knowledgebase

SDK update: Add knowledgebase #281

Workflow file for this run

name: ci
on: [push]
jobs:
compile:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
- name: Install dependencies
run: poetry install
- name: Compile
run: poetry run mypy .
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
- name: Install dependencies
run: poetry install
- name: Test
run: poetry run pytest -rP .
env:
SDK_TESTING_FILE_STORAGE_ACCOUNT_TOKEN: ${{ secrets.SDK_TESTING_FILE_STORAGE_ACCOUNT_TOKEN }}
SDK_TESTING_KEY: ${{ secrets.SDK_TESTING_KEY }}
SDK_TESTING_KNOWLEDGEBASE_ACCOUNT_TOKEN: ${{ secrets.SDK_TESTING_KNOWLEDGEBASE_ACCOUNT_TOKEN }}
publish:
needs: [compile, test]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
- name: Install dependencies
run: poetry install
- name: Publish to pypi
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
poetry --no-interaction -v publish --build
env:
PYPI_TOKEN: ${{ secrets.MERGE_PYPI_TOKEN }}