Skip to content

Commit

Permalink
Switch from travis-ci to gh-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
asyncon committed Feb 18, 2022
1 parent 9569129 commit 1e3e6a2
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 45 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI

on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.6", "3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install tox and any other packages
run: pip install tox
- name: Run tox
# Run tox using the version of Python in `PATH`
run: tox -e py
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow 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

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: python -m pip install --upgrade pip build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pytest = "*"
pytest-cov = "*"
requests-mock = "*"
octoblox = {editable = true, path = "."}
black = ">=20.8b1"
black = "*"
flake8 = "*"
flake8-bugbear = "*"

Expand All @@ -18,4 +18,4 @@ octodns = "*"

[scripts]
setup = "pipenv install --dev --skip-lock"
clean = "rm -rf .pytest_cache .venv build dist .tox octoblox.egg-info tests/__pycache__ .coverage Pipfile.lock"
clean = "git clean -fX ."
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Infoblox provider for [octoDNS](https://github.com/github/octodns)

[![PyPI](https://img.shields.io/pypi/v/octoblox.svg)](https://pypi.org/project/octoblox/)
[![CI](https://github.com/asyncon/octoblox/actions/workflows/ci.yml/badge.svg)](https://github.com/asyncon/octoblox/actions/workflows/ci.yml)
[![MIT](https://img.shields.io/pypi/l/octoblox.svg)](https://github.com/asyncon/octoblox/blob/master/LICENSE)
[![Travis (.org)](https://img.shields.io/travis/asyncon/octoblox)](https://travis-ci.org/projects/asyncon/octoblox)
[![PyPI](https://img.shields.io/pypi/v/octoblox.svg)](https://pypi.org/project/octoblox/)
[![Python](https://img.shields.io/pypi/pyversions/octoblox.svg)](https://pypi.org/project/octoblox/)
[![Downloads](https://pepy.tech/badge/octoblox)](https://pepy.tech/project/octoblox)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
Expand Down
4 changes: 2 additions & 2 deletions octoblox/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def payload_value(self, type, value, ttl, default_ttl):
for vk, k in spec.items()
}
),
**({} if type == 'NS' else {'use_ttl': ttl != default_ttl, 'ttl': ttl,}),
**({} if type == 'NS' else {'use_ttl': ttl != default_ttl, 'ttl': ttl}),
}

def add_record(self, type, zone, name, value, ttl, default_ttl):
Expand Down Expand Up @@ -361,7 +361,7 @@ def _apply_Update(self, zone, change, default_ttl):
type = new._type
update = ext.ttl != new.ttl
values = [new.value] if type in single_types else new.values
evalues = [ext.value,] if type in single_types else ext.values
evalues = [ext.value] if type in single_types else ext.values
for value in values:
if type == 'ALIAS':
spec = type_map[type]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4", "setuptools-pipfile>=0.5"]
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2", "setuptools-pipfile>=0.5"]
build-backend = "setuptools.build_meta"

[tool.black]
Expand Down
4 changes: 3 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ project_urls =
requires_python = >=3.6
classifiers =
Development Status :: 3 - Alpha
Intended Audience :: Developers
Intended Audience :: System Administrators
Topic :: Internet :: Name Service (DNS)
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python
Expand All @@ -27,6 +28,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10

[options]
zip_safe = True
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py36,py37,py38
envlist = py36,py37,py38,py39,py310
isolated_build = True
skip_missing_interpreters = {env:TOX_SKIP_MISSING_INTERPRETERS:False}

Expand Down

0 comments on commit 1e3e6a2

Please sign in to comment.