feat: deprecate simple kili format (#1269) #4165
Workflow file for this run
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: CI | |
on: [push] | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.7 | |
cache: "pip" | |
- uses: pre-commit/[email protected] | |
pylint: | |
runs-on: ubuntu-latest | |
name: Pylint test | |
strategy: | |
matrix: | |
python-version: ["3.7", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pip" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ".[dev]" | |
- name: Analysing the code with pylint | |
run: | | |
pylint --rcfile=.pylintrc src/kili | |
pyright: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: ["3.7", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.version }} | |
cache: "pip" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ".[dev]" | |
- name: Run pyright | |
run: pyright . | |
unittest: | |
timeout-minutes: 10 | |
name: Unit tests | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
python-version: 3.7 | |
- os: windows-latest | |
python-version: 3.7 | |
- os: ubuntu-latest | |
python-version: 3.11 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pip" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ".[dev]" | |
- name: Unit tests | |
run: pytest -n auto -ra -sv --color yes --code-highlight yes --durations=15 -vv --ignore tests/test_notebooks.py --ignore tests/e2e/ --cov=src/kili --cov-report=term-missing --cov-config=.coveragerc --cov-fail-under=79 | |
markdown-link-check: | |
timeout-minutes: 2 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: lycheeverse/[email protected] | |
with: | |
fail: true | |
debug: false | |
args: "--quiet --no-progress --insecure './**/*.md' --exclude '^(http|https)://cloud.kili-technology.com/api/label/v2/graphql$'" | |
build-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.7 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools twine wheel | |
- name: Build | |
run: | | |
python setup.py sdist bdist_wheel | |
- name: Set proper test server (preprod, staging) | |
shell: bash | |
run: | | |
# if branch starts with "release/", then test against preprod | |
if [[ "${{ github.ref_name }}" == release/* ]]; then | |
echo "TEST_AGAINST=PREPROD" >> $GITHUB_ENV | |
echo "KILI_API_ENDPOINT=https://preproduction.cloud.kili-technology.com/api/label/v2/graphql" >> $GITHUB_ENV | |
else | |
echo "TEST_AGAINST=STAGING" >> $GITHUB_ENV | |
echo "KILI_API_ENDPOINT=https://staging.cloud.kili-technology.com/api/label/v2/graphql" >> $GITHUB_ENV | |
fi | |
- name: Test the Build | |
run: | | |
python -m pip install . # to install dependencies | |
python -m pip uninstall -y kili | |
python -m pip install --find-links=dist --no-index kili | |
python -c 'from kili.client import Kili; k=Kili(); print("Everything OK!")' | |
env: | |
KILI_API_ENDPOINT: ${{ env.KILI_API_ENDPOINT }} | |
KILI_API_KEY: ${{ secrets[format('KILI_USER_API_KEY_{0}', env.TEST_AGAINST)] }} |