I ran into a situation similar to Config with a python build and a matrix only runs the matrix with the jobs matrix. The following config ended up with no jobs specified:
---
language: python
os:
- linux
python:
- "3.8"
stages:
- test
- name: deploy
if: tag IS present
install:
- pip install --upgrade pip setuptools wheel tox tox-travis
script:
- tox -- --cov-report=xml
after_success:
- bash <(curl -f https://codecov.io/bash)
jobs:
fast_finish: true
include:
- stage: deploy
python: "3.8"
install:
- pip install --upgrade setuptools wheel
script: skip
after_success: "Deploying..."
deploy:
- provider: pypi
cleanup: false
distributions: sdist bdist_wheel
username: $PYPI_USERNAME
password: $PYPI_PASSWORD
on:
tags: true
repo: $GITHUB_REPO
- provider: releases
cleanup: false
token: $GITHUB_TOKEN
on:
tags: true
repo: $GITHUB_REPO
but when I include an empty stage: test
it works.
---
language: python
os:
- linux
python:
- "3.8"
stages:
- test
- name: deploy
if: tag IS present
install:
- pip install --upgrade pip setuptools wheel tox tox-travis
script:
- tox -- --cov-report=xml
after_success:
- bash <(curl -f https://codecov.io/bash)
jobs:
fast_finish: true
include:
- stage: test
- stage: deploy
python: "3.8"
install:
- pip install --upgrade setuptools wheel
script: skip
after_success: "Deploying..."
deploy:
- provider: pypi
cleanup: false
distributions: sdist bdist_wheel
username: $PYPI_USERNAME
password: $PYPI_PASSWORD
on:
tags: true
repo: $GITHUB_REPO
- provider: releases
cleanup: false
token: $GITHUB_TOKEN
on:
tags: true
repo: $GITHUB_REPO