.gitlab-ci.yml with
stages:
- test
jobs:
lint:
stage: test
image: python:3.8 # Assuming same image for both jobs
script:
- pip install black
- black --check .
allow_failure: false
testcov:
stage: test
image: python:3.8
script:
- pip install pytest pytest-cov
- pytest --cov api/
- curl -Os https://cli.codecov.io/latest/linux/codecov
- chmod +x codecov
- ./codecov upload-process -t $CODECOV_TOKEN
fails with
This GitLab CI configuration is invalid: jobs jobs config should implement a script: or a trigger: keyword
However the same without jobs and stages is valid and works
lint:
image: python:3.8 # Assuming same image for both jobs
script:
- pip install black
- black --check .
allow_failure: false
testcov:
image: python:3.8
script:
- pip install pytest pytest-cov
- pytest --cov api/
- curl -Os https://cli.codecov.io/latest/linux/codecov
- chmod +x codecov
- ./codecov upload-process -t $CODECOV_TOKEN
is there something that missing in stages version of code?