fix type errors #154
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: tests | |
on: | |
push: | |
workflow_call: | |
secrets: | |
OPENAI_API_KEY: | |
required: true | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macOS-latest] | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 10 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" | |
- name: Install dependencies | |
run: python -m pip install -e .[test] | |
- name: Set environment variable using secret | |
run: echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}" >> $GITHUB_ENV | |
- name: Run test suite | |
run: pytest -v | |
code-checks: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" | |
- name: Install black and mypy | |
run: python -m pip install black=="24.*" mypy=="1.*" | |
- name: Check style | |
run: black --check --diff . | |
- name: chek types | |
run: mypy . |