From 5ca71154adb2bc2041d359fc950e7355c29ec5c4 Mon Sep 17 00:00:00 2001 From: Philippe THOMY Date: Tue, 14 May 2024 22:39:53 +0200 Subject: [PATCH] Update and rename python-package.yml to ci.yml --- .../workflows/{python-package.yml => ci.yml} | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) rename .github/workflows/{python-package.yml => ci.yml} (61%) diff --git a/.github/workflows/python-package.yml b/.github/workflows/ci.yml similarity index 61% rename from .github/workflows/python-package.yml rename to .github/workflows/ci.yml index 515994b..9548101 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/ci.yml @@ -1,13 +1,16 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: Python package +name: CI on: push: branches: [ "main" ] pull_request: branches: [ "main" ] + paths: + - 'ci/**' + - '.github/**' + - 'docs/**' + - 'example/**' + - 'tab_analysis/**' jobs: build: @@ -17,29 +20,27 @@ jobs: fail-fast: false matrix: python-version: ["3.9", "3.10", "3.11"] - env: [""] - include: - # Minimum python version: - - env: "env-analysis" + steps: - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies + + - name: Install run: | python -m pip install --upgrade pip - pip install flake8 - #python -m pip install flake8 - # if [ -f requirements.txt ]; then pip install -r requirements.txt pip install -r ./ci/requirements.txt - - name: Lint with flake8 + + - name: Lint 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 - - name: Test with unittest + + - name: Run tests run: | python -m unittest discover -s ./tests -p 'tests_*.py'