Gitlab-ci not running pytest

Hey all. I have a very basic python app that I’m testing with to get the CI working. I have a gitlab-ci.yml file that contains the following which runs on a windows gitlab runner.

test:
script:
- conda env create -f environment.yml
- activate scraper-worker
- python -m pytest

It creates the environment ok, but as soon as the the environment is activated it just prints out: Job succeeded, and it never runs pytest, it just finishes.

If I comment out the activate scraper-worker line then pytest will run, but it fails obviously because the environment isn’t active. Any idea what I’ve got wrong here?

Just as an FYI. I have tried doing the environment setup and activation in a before_script, but again, same thing. Env gets built and activated but the test never runs.

Hey! Have you made any progress on this issue? I’m asking because I’m running into the same issue. My .gitlab-ci.yml looks like this:

before_script:
  - conda env create --file environment.yml --force
  - activate dev_py_36

stages:
  - test

tests:
  stage: test
  script:
  - python -m unittest discover -v

The conda environment is built and successfully activated, but the Python call is not executed. If I remove the before_script it works as expected.

My GitLab Runner is on Windows 10.

In windows use call
call activate scraper_worker