Skip to content

Commit

Permalink
Fix the Travis pipeline (networktocode#961)
Browse files Browse the repository at this point in the history
  • Loading branch information
ubajze authored and cppmonkey committed Oct 25, 2023
1 parent 7bce7a4 commit 734347f
Showing 1 changed file with 54 additions and 23 deletions.
77 changes: 54 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
---
stages:
- name: "lint"
- name: "test"
- name: "deploy-github"
if: "tag IS present"
- name: "deploy-pypi"
if: "tag IS present"

language: "python"
dist: "xenial"
os: "linux"
Expand All @@ -8,30 +16,53 @@ python:
- "3.7"
- "3.8"

install:
- "pip install virtualenv"
- "virtualenv .venv"
- ".venv/bin/pip install pip setuptools -U"
- ".venv/bin/pip install tox"
# --------------------------------------------------------------------------
# Tests
# --------------------------------------------------------------------------
before_script:
- "pip install --upgrade pip"
- "pip install poetry"
- "poetry install"
script:
- "poetry run tox -e py36,py37,py38"


jobs:
include:
- stage: "lint"
script: ".venv/bin/tox -e black"
- script: ".venv/bin/tox -e flake8"
- script: ".venv/bin/tox -e yamllint"

stages:
- "lint"
- "test"

script:
- ".venv/bin/tox -e py36,py37,py38"

deploy:
provider: "script"
script:
- "poetry config pypi-token.pypi $PYPI_TOKEN"
- "poetry publish --build"
on:
tags: true
before_script:
- "pip install --upgrade pip"
- "pip install poetry"
- "poetry install"
script:
- "poetry run tox -e black"
- "poetry run tox -e flake8"
- "poetry run tox -e yamllint"
- stage: "deploy-github"
before_script:
- "pip install --upgrade pip"
- "pip install poetry"
script:
- "poetry version $TRAVIS_TAG"
- "poetry build"
deploy:
provider: "releases"
api_key: "$GITHUB_AUTH_TOKEN"
file_glob: true
file: "dist/*"
skip_cleanup: true
"on":
all_branches: true
- stage: "deploy-pypi"
before_script:
- "pip install --upgrade pip"
- "pip install poetry"
script:
- "echo Deploying the release to PyPI"
- "poetry version $TRAVIS_TAG"
deploy:
provider: "script"
skip_cleanup: true
script: "poetry publish --build -u __token__ -p $PYPI_TOKEN"
"on":
all_branches: true

0 comments on commit 734347f

Please sign in to comment.