Skip to content

Commit

Permalink
Merge pull request #301 from devopshq/develop
Browse files Browse the repository at this point in the history
Release (15 Dec 2021)
  • Loading branch information
allburov committed Dec 15, 2021
2 parents a95d10e + 95df556 commit 0b0e01b
Show file tree
Hide file tree
Showing 18 changed files with 1,050 additions and 338 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- '*'

jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1

- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt
- name: Unittests
run: |
python -m unittest discover tests/unit -v
45 changes: 45 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This workflow will be triggered when new TAG is pushed. It will create version.txt file with tag name
# Then workflow will publish a package to PyPi with version from version.txt

name: Upload Python Package

on:
push:
tags:
- '*'

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Set version
run: |
rm -f version.txt
echo ${{ github.ref_name }} > version.txt
- name: Test version.txt file
run: |
if [ ! -f version.txt ]; then
echo "version.txt does not exist"
exit 1
fi
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
12 changes: 4 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ repos:
- id: autoflake
args: ['-i', '--remove-all-unused-imports']
- repo: https://github.com/psf/black
rev: 21.8b0
rev: 21.11b1
hooks:
- id: black
language_version: python3
- repo: https://github.com/asottile/blacken-docs
rev: v1.11.0
rev: v1.12.0
hooks:
- id: blacken-docs
additional_dependencies: [black]
Expand All @@ -19,7 +19,7 @@ repos:
hooks:
- id: reorder-python-imports
- repo: https://github.com/pycqa/flake8
rev: 3.9.2
rev: 4.0.1
hooks:
- id: flake8
- repo: https://github.com/Lucas-C/pre-commit-hooks-nodejs
Expand All @@ -33,8 +33,4 @@ repos:
files: FAQ.md$
- id: markdown-toc
name: CONTRIBUTE.md
files: CONTRIBUTE.md$
- repo: https://github.com/alphagov/verify-travis-pre-commit-hook
rev: 2d69b57aa5e58dd31c01002ae4abcdf9b54549a1
hooks:
- id: travis-yml-lint
files: CONTRIBUTE.md$
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
include README.md
include version.txt
Loading

0 comments on commit 0b0e01b

Please sign in to comment.