chore: Include types to instructor.dsl #545
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: MyPy | |
on: | |
push: | |
pull_request: | |
branches: [ main ] | |
env: | |
WORKING_DIRECTORY: "." | |
MYPY_OUTPUT_FILENAME: "mypy.log" | |
CUSTOM_FLAGS: "--python-version=3.9 --color-output --no-pretty --follow-imports=skip" | |
CUSTOM_PACKAGES: | | |
instructor/_types/_alias.py | |
instructor/cli/cli.py | |
instructor/cli/files.py | |
instructor/cli/jobs.py | |
instructor/cli/usage.py | |
instructor/exceptions.py | |
instructor/distil.py | |
instructor/function_calls.py | |
tests/test_function_calls.py | |
tests/test_distil.py | |
jobs: | |
MyPy: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Environment setup | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
cache: "pip" | |
- name: Install dev dependencies | |
run: | | |
python3 -m pip install --upgrade pip setuptools wheel | |
python3 -m pip install -r requirements.txt | |
python3 -m pip install -r requirements-doc.txt | |
- name: Run Continuous Integration Action | |
run: | | |
set -e -o pipefail | |
export CUSTOM_PACKAGES="${{ env.CUSTOM_PACKAGES }}" && | |
export CUSTOM_FLAGS="${{ env.CUSTOM_FLAGS }}" && | |
curl -sSL https://raw.githubusercontent.com/gao-hongnan/omniverse/2fd5de1b8103e955cd5f022ab016b72fa901fa8f/scripts/devops/continuous-integration/type_mypy.sh -o type_mypy.sh | |
chmod +x type_mypy.sh | |
bash type_mypy.sh | tee ${{ env.WORKING_DIRECTORY }}/${{ env.MYPY_OUTPUT_FILENAME }} | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: mypy-log | |
path: ${{ env.WORKING_DIRECTORY }}/${{ env.MYPY_OUTPUT_FILENAME }} |