Skip to content

Commit

Permalink
Move from travis to gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
isik-kaplan committed Nov 14, 2024
1 parent c3d3d7f commit be7090b
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 31 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish

on:
push:
branches:
- master

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Install build tools
run: |
python -m pip install --upgrade pip setuptools wheel build
- name: Build package
run: |
python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
username: __token__
password: ${{ secrets.PYPI_TOKEN }}
packages-dir: dist
30 changes: 30 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Tests

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
os-version: [ubuntu-22.04]

runs-on: ${{ matrix.os-version }}

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Run Tests
run: |
pytest discover tests/.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 23.1.0
rev: 24.10.0
hooks:
- id: black
args: [--line-length=120]

- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
args: [--profile=black, -m=3, -l=120]

- repo: https://github.com/hakancelikdev/unimport
rev: 0.14.1
rev: 1.2.1
hooks:
- id: unimport
args: [--remove, --include-star-import]
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.com/isik-kaplan/iubeo.svg?branch=master)](https://travis-ci.com/isik-kaplan/iubeo)
[![Build Status](https://github.com/isik-kaplan/iubeo/actions/workflows/tests.yml/badge.svg)](https://github.com/isik-kaplan/iubeo/actions/workflows/tests.yml/badge.svg)
[![PyPI - License](https://img.shields.io/pypi/l/iubeo.svg)](https://pypi.org/project/iubeo/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/iubeo.svg)](https://pypi.org/project/iubeo/)

Expand Down
3 changes: 1 addition & 2 deletions iubeo/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
"""


class ConfigError(ValueError):
...
class ConfigError(ValueError): ...
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "iubeo"
version = "0.2.1"
version = "0.2.2"
description = "Friendlier way to write your config."
authors = ["isik-kaplan <[email protected]>"]

Expand All @@ -19,6 +19,8 @@ classifiers = [
'Development Status :: 3 - Alpha',
]

requires-python = ">=3.5"

[tool.poetry.dependencies]
python = "^3.6.1"

Expand All @@ -29,3 +31,6 @@ pre-commit = "^2.9.3"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[project.urls]
Homepage = "https://github.com/isik-kaplan/django_http_exceptions"

0 comments on commit be7090b

Please sign in to comment.