diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..06094a3 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,42 @@ +name: tests + +on: + push: + branches: [main] + pull_request: + branches: [main] + +env: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + +jobs: + run-tests: + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + python: ["3.8", "3.9", "3.10", "3.11", "3.12"] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + + - name: Install + run: | + python -m pip install --upgrade pip + pip install . + + - name: Install test dependencies + run: python3 -m pip install pytest pytest-asyncio pytest-forked hypothesis pytest-mock + + - name: run tests + run: python3 -m pytest --forked