-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from pazembrz/fix_versioning
setup: fix package versioning
- Loading branch information
Showing
6 changed files
with
132 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Install python dependencies | ||
description: Setup python packages and requirements | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup python additional packages | ||
shell: bash | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel py coveralls | ||
- name: Install requirements | ||
shell: bash | ||
run: pip install -e .[tests] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Run tests | ||
description: Run all required tests | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Run isort | ||
shell: bash | ||
run: isort -rc -c -df | ||
|
||
- name: Run pytest | ||
shell: bash | ||
run: > | ||
py.test | ||
--pep8 | ||
--cov=jsonschema2rst | ||
--cov-report=term-missing | ||
tests | ||
jsonschema2rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: Build and release | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
Test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [2.7, 3.6] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Cache Python | ||
uses: actions/[email protected] | ||
id: cache | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ github.sha }} | ||
|
||
- name: Install python dependencies | ||
uses: ./.github/actions/install-python-dependencies | ||
|
||
- name: Show python dependencies | ||
run: pip freeze | ||
|
||
- name: Run tests | ||
uses: ./.github/actions/run-tests | ||
|
||
- name: Coveralls | ||
uses: AndreMiras/coveralls-python-action@v20201129 | ||
with: | ||
parallel: true | ||
github-token: ${{ secrets.github_token }} | ||
flag-name: run-${{ matrix.test_number }} | ||
|
||
Coveralls: | ||
needs: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Coveralls Finished | ||
uses: AndreMiras/coveralls-python-action@v20201129 | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
parallel-finished: true | ||
|
||
Release: | ||
if: ${{ github.event_name == 'push' }} | ||
needs: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python 2.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 2.7 | ||
|
||
- name: Cache Python Dependencies | ||
uses: actions/[email protected] | ||
id: cache | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ runner.os }}-pip-2.7-${{ github.sha }} | ||
|
||
- name: Install python dependencies | ||
uses: ./.github/actions/install-python-dependencies | ||
|
||
- name: Build package | ||
run: python setup.py sdist bdist_wheel | ||
|
||
- name: Publish package | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,7 +76,7 @@ target/ | |
celerybeat-schedule | ||
|
||
# dotenv | ||
.env | ||
.env* | ||
|
||
# virtualenv | ||
venv/ | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,26 +31,25 @@ | |
readme = open('README.rst').read() | ||
|
||
tests_require = [ | ||
'pytest', | ||
"coverage>=4.0", | ||
"isort>=4.2.2", | ||
"isort<5.0.0", | ||
"pytest-cache>=1.0", | ||
"pytest-cov>=1.8.0", | ||
"pytest-pep8>=1.0.6", | ||
"pytest>=3.0.3", | ||
"pytest<6.0.0", | ||
"mock>=2.0.0", | ||
] | ||
|
||
install_requires = [ | ||
'pyyaml', | ||
'autosemver', | ||
'isort', | ||
'autosemver==0.5.5', | ||
'isort<5.0.0', | ||
'six', | ||
] | ||
|
||
|
||
setup( | ||
name='jsonschema2rst', | ||
version='1.0', | ||
author='CERN', | ||
author_email='[email protected]', | ||
description='Parser for yaml/json schemas to rst', | ||
|