Skip to content

Commit

Permalink
Merge pull request #53 from devopshq/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
allburov committed Nov 20, 2023
2 parents a92cc1f + 8a08fcd commit 4f322a6
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 26 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: publish

on:
release:
types: [created]

jobs:
tests:
uses: ./.github/workflows/tests.yml
publish:
needs: [tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install -r requirements.txt
pip install -r test-requirements.txt
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
37 changes: 37 additions & 0 deletions .github/workflows/publish_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: publish test

on:
push:
branches:
- testpypi
- testpypi-*
- testpypi/*

jobs:
tests:
uses: ./.github/workflows/tests.yml
publish_test:
needs: [tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install -r requirements.txt
pip install -r test-requirements.txt
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TESTPYPI_API_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload --repository testpypi dist/*
42 changes: 42 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: tests

on:
pull_request:
branches:
- develop

workflow_call:

jobs:
# TODO: https://github.com/devopshq/teamcity/issues/3 - comment carried over from .travis.yml
# style:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: '3.x'

# - name: requirements
# run: pip install -r test-requirements.txt

# - name: run checker
# run: flake8

tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: requirements
run: |
pip install -r requirements.txt
pip install -r test-requirements.txt
- name: run tests
run: pytest
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,8 @@ bt = bt.read()

## What next?
See more examples and full documantation on page: https://devopshq.github.io/teamcity

## How to release?
1. Bump version in `dohq_teamcity/version.py`
2. Merge changes to **master** branch
3. Create Github Release
4 changes: 2 additions & 2 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
coverage>=4.0.3
nose>=1.3.7
pytest-cov>=4,<5
pytest>=7,<8
pluggy>=0.3.1
py>=1.4.31
randomize>=0.13

0 comments on commit 4f322a6

Please sign in to comment.