From 46a51cce11cfce839d50f8cdb521d7e12770c6b0 Mon Sep 17 00:00:00 2001 From: Patrick Robertson Date: Thu, 27 Mar 2025 15:18:58 +0400 Subject: [PATCH 1/2] Fix up tests-download to properly run once core tests completed --- .github/workflows/tests-download.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests-download.yaml b/.github/workflows/tests-download.yaml index a8337cf..0aafdd6 100644 --- a/.github/workflows/tests-download.yaml +++ b/.github/workflows/tests-download.yaml @@ -10,9 +10,6 @@ on: workflows: ["Core Tests"] types: - completed - branches: [main] - paths: - - src/** jobs: tests: @@ -30,7 +27,10 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.event.workflow_run.head_branch || github.ref }} + # For PRs, use the head commit SHA from the triggering workflow + ref: ${{ github.event.workflow_run.head_sha || github.ref }} + # If PR is from a fork, we need fetch-depth: 0 + fetch-depth: ${{ github.event.workflow_run.head_repository.fork && '0' || '1' }} - name: Install poetry run: pipx install poetry From a448e2532c58abe958cbc59bd85aaec5c1ebec92 Mon Sep 17 00:00:00 2001 From: Patrick Robertson Date: Thu, 27 Mar 2025 15:20:52 +0400 Subject: [PATCH 2/2] Code tweak for clarity --- src/auto_archiver/core/module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auto_archiver/core/module.py b/src/auto_archiver/core/module.py index 1494fd6..3db861b 100644 --- a/src/auto_archiver/core/module.py +++ b/src/auto_archiver/core/module.py @@ -214,7 +214,7 @@ class LazyBaseModule: # check external dependencies are installed def check_deps(deps, check): - for dep in filter(lambda d: len(d.strip()), deps): + for dep in filter(lambda d: len(d.strip()) > 0, deps): if not check(dep.strip()): logger.error( f"Module '{self.name}' requires external dependency '{dep}' which is not available/setup. \