Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Purpose of workflow mini.yml #96

Open
mbruns91 opened this issue Oct 18, 2023 · 2 comments
Open

Purpose of workflow mini.yml #96

mbruns91 opened this issue Oct 18, 2023 · 2 comments
Assignees

Comments

@mbruns91
Copy link

mbruns91 commented Oct 18, 2023

I'm migrating the repository's CI to use our centralized actions/workflows (see branch migrate_ci). This was mostly straight forward, I guess. With one workflow I did not really now what to do:
.github/workflows/mini.yml runs tests in a minimal conda environment on pushes and PRs to main. I tried to reconstruct this workflow with our centralized actions. What is actually the purpose of this workflow? On the same events, all those tests are run anyways (via push-pull-main.yml) using a slightly larger environment.

@jan-janssen
Copy link
Member

structuretoolkit uses extra_require in setup.py to minimise the dependencies which are installed by default and provides optional requirements when users are interested in specific functionality. The mini.yml only installs the minimalistic environment without the extra_require and tests if the package imports correctly and can be executed with the minimal environment. When we add new requirements to extra_require but the package is not able to be run without these requirements then the mini.yml test breaks.

@liamhuber
Copy link
Member

liamhuber commented Oct 18, 2023

Right, I had forgotten that! I think this will work with the centralized CI using something along the lines of

# This runs jobs which pyiron modules should run on pushes or PRs to main

name: Push-main-Pull-all

on:
  push:
    branches: [ main ]
  pull_request:

jobs:
  pyiron:
    uses: pyiron/actions/.github/workflows/push-pull-main.yml@main
    secrets: inherit
    with:
      notebooks-env-files: .ci_support/environment-mini.yml .ci_support/environment-extras.yml
      tests-env-files: .ci_support/environment-mini.yml .ci_support/environment-extras.yml

  mini-tests:
    needs: pyiron  # To make sure any env updates are included from pyiron/commit-updated-env
    runs-on: whatever OS we want right now
    steps:
      - uses: actions/checkout@v3
      - uses: pyiron/actions/unit-tests@main
        with:
          python-version: whatever
          env-prefix: whatever
          env-label: mini or whatever
          env-files: .ci_support/environment-mini.yml   # only the core ones!
          test-dir: tests or tests/unit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants