From 021073bdefc7647b06fb57e0a677d41e245612b8 Mon Sep 17 00:00:00 2001 From: Manuel Lera-Ramirez Date: Tue, 15 Oct 2024 14:19:50 +0100 Subject: [PATCH 1/2] fix action --- .../pydna_test_and_coverage_workflow.yml | 43 ++++++++++--------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/.github/workflows/pydna_test_and_coverage_workflow.yml b/.github/workflows/pydna_test_and_coverage_workflow.yml index 1a235c02..159d8d08 100644 --- a/.github/workflows/pydna_test_and_coverage_workflow.yml +++ b/.github/workflows/pydna_test_and_coverage_workflow.yml @@ -2,11 +2,11 @@ name: Tests & Coverage on: push: branches: - - '**' - - '!master' # excludes master branch - - '!testpypi' # excludes testpypi branch + - "**" + - "!master" # excludes master branch + - "!testpypi" # excludes testpypi branch tags-ignore: - - '*.*' + - "*.*" pull_request: {} jobs: build: @@ -14,20 +14,20 @@ jobs: strategy: fail-fast: false matrix: - os: [ 'macos-latest', 'windows-latest' ] + os: ["macos-latest", "windows-latest"] python-version: ["3.12", "3.11", "3.10", "3.9", "3.8"] include: - - os: ubuntu-latest - python-version: "3.8" - codecov: true - - os: ubuntu-latest - python-version: "3.9" - - os: ubuntu-latest - python-version: "3.10" - - os: ubuntu-latest - python-version: "3.11" - - os: ubuntu-latest - python-version: "3.12" + - os: ubuntu-latest + python-version: "3.8" + codecov: true + - os: ubuntu-latest + python-version: "3.9" + - os: ubuntu-latest + python-version: "3.10" + - os: ubuntu-latest + python-version: "3.11" + - os: ubuntu-latest + python-version: "3.12" defaults: run: shell: bash @@ -50,7 +50,7 @@ jobs: - name: Install Poetry uses: snok/install-poetry@v1 with: - virtualenvs.prefer-active-python: true + virtualenvs.prefer-active-python: true - name: 🔩 list Poetry settings run: poetry config --list @@ -79,10 +79,13 @@ jobs: run: poetry run pre-commit install --install-hooks - name: Run style checking via pre-commit - if: (matrix.codecov) - run: poetry run pre-commit run --files ${{ steps.changed-files.outputs.all_changed_files }} - # ====================================================== + if: (matrix.codecov && steps.changed-files.outputs.all_changed_files) + run: | + echo "Changed files:" + echo "${{ steps.changed-files.outputs.all_changed_files }}" | tr ' ' '\n' + poetry run pre-commit run --files ${{ steps.changed-files.outputs.all_changed_files }} + # ====================================================== - name: 🔼 Upload coverage to Codecov if: (matrix.codecov) uses: codecov/codecov-action@v4 From 4e7d4fecea84b99eda0d10d61dc831668537291d Mon Sep 17 00:00:00 2001 From: Manuel Lera-Ramirez Date: Tue, 15 Oct 2024 14:42:03 +0100 Subject: [PATCH 2/2] fix action --- .github/workflows/pydna_test_and_coverage_workflow.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pydna_test_and_coverage_workflow.yml b/.github/workflows/pydna_test_and_coverage_workflow.yml index 159d8d08..09e2cd82 100644 --- a/.github/workflows/pydna_test_and_coverage_workflow.yml +++ b/.github/workflows/pydna_test_and_coverage_workflow.yml @@ -66,6 +66,8 @@ jobs: if: (matrix.codecov) id: changed-files uses: tj-actions/changed-files@v45 + with: + since_last_remote_commit: true - uses: actions/cache@v4 if: (matrix.codecov)