mirror of
https://github.com/kennethreitz/instructor.git
synced 2026-06-05 22:50:18 +00:00
94e32968db
Co-authored-by: Jason Liu <jxnl@users.noreply.github.com>
41 lines
1.4 KiB
YAML
41 lines
1.4 KiB
YAML
name: Continuous Integration
|
|
|
|
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/cli/cli.py instructor/cli/usage.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
|
|
- name: Install dev dependencies
|
|
run: |
|
|
python3 -m pip install --upgrade pip setuptools wheel
|
|
python3 -m pip install -r requirements.txt
|
|
- name: Run Continuous Integration Action
|
|
run: |
|
|
export CUSTOM_PACKAGES="${{ env.CUSTOM_PACKAGES }}" &&
|
|
export CUSTOM_FLAGS="${{ env.CUSTOM_FLAGS }}" &&
|
|
curl -sSL https://raw.githubusercontent.com/gao-hongnan/omniverse/continuous-integration/scripts/devops/continuous-integration/type_mypy.sh |
|
|
bash | 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 }} |