From e4959bb917888a92c4d1708f762c3e2d8cbc814b Mon Sep 17 00:00:00 2001 From: Deepak Raj <54245038+codePerfectPlus@users.noreply.github.com> Date: Sat, 1 Jun 2024 08:35:10 +0530 Subject: [PATCH] chore: Update Python version to 3.11 in run-pytest.yaml --- .github/workflows/run-pytest.yaml | 38 ++++++++++++++----------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/.github/workflows/run-pytest.yaml b/.github/workflows/run-pytest.yaml index 242db6c..83e7b95 100644 --- a/.github/workflows/run-pytest.yaml +++ b/.github/workflows/run-pytest.yaml @@ -1,35 +1,31 @@ -name: Run Pytest +name: Python package -on: [push, pull_request] +on: [push] jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.10"] steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - name: Set up Python + # This is the version of the action for setting up Python, not the Python version. + uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + # Semantic version range syntax or exact version of a Python version + python-version: '3.11' + # Optional - x64 or x86 architecture, defaults to x64 + architecture: 'x64' + # You can test your matrix by printing the current Python version + - name: Display Python version + run: python -c "import sys; print(sys.version)" + - name: Install dependencies run: | - sudo apt-get update - sudo apt install libespeak-dev - sudo apt-get install python-dateutil python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; 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=200 --statistics --ignore=E501,E402 + pip install -r requirements.txt - name: Test with pytest run: | - pytest + pip install pytest pytest-cov + pytest tests --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html