From 36ec04e8fc8a5a14215c0d0ec708e8da3e9f40b4 Mon Sep 17 00:00:00 2001 From: Vatsal Jagani Date: Fri, 15 Mar 2024 12:18:51 +0530 Subject: [PATCH] Fixed small issue with python setup and ruff issue. --- .github/workflows/py_unit_tests.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/py_unit_tests.yml b/.github/workflows/py_unit_tests.yml index 0192c63..71662fd 100644 --- a/.github/workflows/py_unit_tests.yml +++ b/.github/workflows/py_unit_tests.yml @@ -24,7 +24,9 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 + with: + python-version: '3.11' - name: Display Python version run: python -c "import sys; print(sys.version)" @@ -34,6 +36,10 @@ jobs: python -m pip install --upgrade pip pip install -r tests/requirements.txt + - name: Linting with Ruff + run: ruff check --ignore=E721,E722,E401 --output-format=github --exclude=tests/test_app_repos --exclude=repodir/tests/test_app_repos . + # continue-on-error: true # to ignore ruff errors + - name: Run Python Unit Tests env: SPLUNKBASE_USERNAME_FOR_TEST: ${{ secrets.SPLUNKBASE_USERNAME }} @@ -46,7 +52,3 @@ jobs: pytest_results_file: "junit/test-results.xml" pytest_cov_file: "coverage.xml" if: ${{ always() }} - - - name: Linting with Ruff - run: ruff check --ignore=E721,E722,E401 --output-format=github --exclude=tests/test_app_repos . - # continue-on-error: true # need to remove this later on to catch the errors anf fail the workflow on linting errors