diff --git a/.github/workflows/tests-core.yaml b/.github/workflows/tests-core.yaml index 57028bd..c839249 100644 --- a/.github/workflows/tests-core.yaml +++ b/.github/workflows/tests-core.yaml @@ -20,8 +20,7 @@ jobs: fail-fast: false matrix: python-version: ["3.10", "3.11", "3.12"] - os: [ubuntu-22.04] - #TODO: re-enable ubuntu-latest, this is disabled as oscrypto cannot be pinned to github commit and pushed to pypi + os: [ubuntu-22.04, ubuntu-latest] defaults: run: working-directory: ./ diff --git a/.github/workflows/tests-download.yaml b/.github/workflows/tests-download.yaml index a68231f..a8337cf 100644 --- a/.github/workflows/tests-download.yaml +++ b/.github/workflows/tests-download.yaml @@ -1,15 +1,23 @@ name: Download Tests on: + # Schedule this workflow to run every Monday at 14:35 UTC schedule: - cron: '35 14 * * 1' - pull_request: - branches: [ main ] + + # For PRs, run the tests-core workflow first + workflow_run: + workflows: ["Core Tests"] + types: + - completed + branches: [main] paths: - src/** jobs: tests: + # Only run if the triggering workflow (tests-core) succeeded + if: ${{ github.event_name == 'schedule' || github.event.workflow_run.conclusion == 'success' }} runs-on: ubuntu-22.04 strategy: fail-fast: false @@ -21,6 +29,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event.workflow_run.head_branch || github.ref }} - name: Install poetry run: pipx install poetry diff --git a/src/auto_archiver/core/module.py b/src/auto_archiver/core/module.py index 3fdc3ae..1494fd6 100644 --- a/src/auto_archiver/core/module.py +++ b/src/auto_archiver/core/module.py @@ -214,11 +214,8 @@ class LazyBaseModule: # check external dependencies are installed def check_deps(deps, check): - for dep in deps: - if not len(dep): - # clear out any empty strings that a user may have erroneously added - continue - if not check(dep): + for dep in filter(lambda d: len(d.strip()), deps): + if not check(dep.strip()): logger.error( f"Module '{self.name}' requires external dependency '{dep}' which is not available/setup. \ Have you installed the required dependencies for the '{self.name}' module? See the documentation for more information."