diff --git a/.github/workflows/lint-vizro-ai.yml b/.github/workflows/checks-vizro-ai.yml similarity index 94% rename from .github/workflows/lint-vizro-ai.yml rename to .github/workflows/checks-vizro-ai.yml index 95ac9e1a2..1b05ace55 100644 --- a/.github/workflows/lint-vizro-ai.yml +++ b/.github/workflows/checks-vizro-ai.yml @@ -1,4 +1,4 @@ -name: lint-vizro-ai +name: checks-vizro-ai defaults: run: working-directory: vizro-ai @@ -6,12 +6,16 @@ defaults: on: push: branches: [main] + paths: + - "vizro-ai/**" pull_request: branches: - "main" + paths: + - "vizro-ai/**" concurrency: - group: lint-${{ github.head_ref }} + group: checks-${{ github.head_ref }} cancel-in-progress: true env: @@ -42,9 +46,6 @@ jobs: - name: List dependencies run: hatch run all.py${{ matrix.python-version }}:pip freeze - - name: Lint - run: hatch run all.py${{ matrix.python-version }}:lint - - name: Check requirements for Snyk are up to date run: | pwd diff --git a/.github/workflows/lint-vizro-core.yml b/.github/workflows/checks-vizro-core.yml similarity index 94% rename from .github/workflows/lint-vizro-core.yml rename to .github/workflows/checks-vizro-core.yml index 76754e2cc..5a368edc1 100644 --- a/.github/workflows/lint-vizro-core.yml +++ b/.github/workflows/checks-vizro-core.yml @@ -1,4 +1,4 @@ -name: lint-vizro-core +name: checks-vizro-core defaults: run: @@ -7,12 +7,16 @@ defaults: on: push: branches: [main] + paths: + - "vizro-core/**" pull_request: branches: - "main" + paths: + - "vizro-core/**" concurrency: - group: lint-${{ github.head_ref }} + group: checks-${{ github.head_ref }} cancel-in-progress: true env: @@ -43,9 +47,6 @@ jobs: - name: List dependencies run: hatch run all.py${{ matrix.python-version }}:pip freeze - - name: Lint - run: hatch run all.py${{ matrix.python-version }}:lint - - name: Check schema is up to date run: hatch run all.py${{ matrix.python-version }}:schema --check diff --git a/.github/workflows/lint-vizro-all.yml b/.github/workflows/lint-vizro-all.yml new file mode 100644 index 000000000..ea820acd9 --- /dev/null +++ b/.github/workflows/lint-vizro-all.yml @@ -0,0 +1,47 @@ +name: lint-vizro-all + +defaults: + run: + working-directory: vizro-core # but could be any folder + +on: + push: + branches: [main] + pull_request: + branches: + - "main" + +concurrency: + group: lint-${{ github.head_ref }} + cancel-in-progress: true + +env: + PYTHONUNBUFFERED: "1" + FORCE_COLOR: "1" + +jobs: + run: + name: Python ${{ matrix.python-version }} on Linux + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8"] + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }} + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Hatch + run: pip install --upgrade hatch + + - name: List dependencies + run: hatch run all.py${{ matrix.python-version }}:pip freeze + + - name: Lint + run: hatch run all.py${{ matrix.python-version }}:lint diff --git a/.github/workflows/test-integration-vizro-core.yml b/.github/workflows/test-integration-vizro-core.yml index cd6bdd2fc..398fb8c7a 100644 --- a/.github/workflows/test-integration-vizro-core.yml +++ b/.github/workflows/test-integration-vizro-core.yml @@ -7,6 +7,8 @@ defaults: on: push: branches: [main] + paths: + - "vizro-core/src/**" pull_request: branches: - "main" diff --git a/.github/workflows/test-unit-vizro-ai.yml b/.github/workflows/test-unit-vizro-ai.yml index feaf9d826..11f79f8a7 100644 --- a/.github/workflows/test-unit-vizro-ai.yml +++ b/.github/workflows/test-unit-vizro-ai.yml @@ -7,9 +7,13 @@ defaults: on: push: branches: [main] + paths: + - "vizro-core/src/**" pull_request: branches: - "main" + paths: + - "vizro-core/src/**" concurrency: group: test-unit-${{ github.head_ref }} diff --git a/.github/workflows/test-unit-vizro-core.yml b/.github/workflows/test-unit-vizro-core.yml index ea26080b4..ca20299aa 100644 --- a/.github/workflows/test-unit-vizro-core.yml +++ b/.github/workflows/test-unit-vizro-core.yml @@ -7,6 +7,8 @@ defaults: on: push: branches: [main] + paths: + - "vizro-core/src/**" pull_request: branches: - "main"