From f0be7e97938933a6f680370a12be914d4baeb9b5 Mon Sep 17 00:00:00 2001 From: Sermet Pekin Date: Wed, 4 Dec 2024 14:26:39 +0300 Subject: [PATCH] . --- .github/workflows/python-package.yml | 39 ++++++++++++++-------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 90e0d6b7..ab06f521 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -13,34 +13,33 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10" , "3.12"] #["3.9", "3.10", "3.11" , "3.12" ] - env: - OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }} + python-version: ["3.10", "3.12"] + steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} + - name: Install dependencies run: | python -m pip install --upgrade pip - - python -m pip install flake8 pytest evdspy - # python -m pip install poetry - python -m pip install uv graphviz - # poetry install - uv venv - source .venv/bin/activate - uv pip install . - - # if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + # Install all dependencies from pyproject.toml or requirements.txt + if [ -f requirements.txt ]; then + pip install -r requirements.txt + elif [ -f pyproject.toml ]; then + pip install . + fi + - name: Lint with flake8 run: | - # stop the build if there are Python syntax errors or undefined names - # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + pip install flake8 + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest run: | - pytest -v \ No newline at end of file + pip install pytest + pytest -v