Skip to content

Migrate lite interpreter usage to LiteRT in oss python build for ai-edge-quantizer. #591

Migrate lite interpreter usage to LiteRT in oss python build for ai-edge-quantizer.

Migrate lite interpreter usage to LiteRT in oss python build for ai-edge-quantizer. #591

# YAML schema for GitHub Actions:
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions
#
# Helpful YAML parser to clarify YAML syntax:
# https://yaml-online-parser.appspot.com/
#
# This workflow will run nightly or when triggered from PR comment
name: Python Unit Tests
on:
merge_group:
pull_request:
branches: ["main"]
push:
branches: ["main"]
workflow_dispatch: # Allow manual triggers
workflow_call:
inputs:
trigger-sha:
required: true
type: string
jobs:
run-unittests-python:
name: "Run Unit Tests with Python ${{ matrix.python-version }} on ${{ matrix.runner }}"
strategy:
matrix:
runner: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11"]
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.trigger-sha }}
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "**/*requirements.txt"
- run: python -m pip install --upgrade pip setuptools
- name: Install dependencies
run: |
python -m pip install -r requirements.txt
- name: Run Tests
run: |
python -m unittest discover --pattern *_test.py
env:
STABLEHLO_BYTECODE_FROM_PRETTYPRINT: 1
CI: "true"