I am trying to set up continuous integration on a gitlab repository.
I have added the following gitlab-ci.yml file:
stages:
- test
test:
image: python:3.7
script:
- python -v
tags:
- python
On gitlab, in settings->CI / CD, I have followed the instructions in 'Set up a specific Runner manually'. During the step 'please enter the executor:', I entered 'shell'.
When I try to commit the above yml file, the runner starts running, although it then gives the following error message:
Running with gitlab-runner 11.9.2 (fa86510e)
on wsf-1102 HUx_zvP8
Using Shell executor...
Running on WSF-1102...
DEPRECATION: this GitLab server doesn't support refspecs, gitlab-runner 12.0 will no longer work with this version of GitLab
Fetching changes...
Clean repository
From [my_repo]
e327c9f..2f0e41f [my_branch]-> origin/[my_branch]
Checking out 2f0e41f1 as [my_branch]...
Skipping Git submodules setup
$ python -v
'python' is not recognized as an internal or external command,
operable program or batch file.
ERROR: Job failed: exit status 9009
How should I properly write the yml file, so that I can use python as a command to later run a test.py file?