Accessing test files in submodules via github actions

we want to access various test files in submodules, attached to our repository and run pytest with github actions on them. Can anyone help with this? We have not managed to solve that issue yet.

Thanks in advance,

Judith and Jonas

The errors in your workflow logs show that there are missing dependencies, at the very least scipy. You will have to install that before running tests.

Those errors have nothing to do with submodules specifically, but you could simplify the workflow a little by using the submodules parameter for actions/checkout instead of retrieving them in a separate step:

    - uses: actions/checkout@v2
        submodules: true

Thanks for the fast reply. We know about the scipy error, but that refers to the test-data that is stored in the test-directory within our master branch on that same repository. That error will be solved soon. We’d rather like to execute the file within our subdirectory on that master branch within ‘test’-directory via github actions.

You can use the working-directory parameter for a run step to run that step in a specific directory. You’ll probably need to tell pytest which test file to use on the command line if you do that.

As a side note, I noticed you’ve added a submodules parameter to the actions/setup-python step in your workflow. That’s not going to work, that parameter needs to go to the actions/checkout step. :wink: