add github actions, fix readme for pypi
This commit is contained in:
35
.github/workflows/ci.yml
vendored
Normal file
35
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: "Coverage Deploy to Codacy"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
test_deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install .[test]
|
||||
|
||||
- name: Test with pytest
|
||||
env:
|
||||
CODACY_API_TOKEN: ${{ secrets.CODACY_API_TOKEN }}
|
||||
shell: bash
|
||||
run: |
|
||||
python3 -m pytest --cov-report term --cov-report xml:cobertura.xml --cov=pina
|
||||
curl -s https://coverage.codacy.com/get.sh -o CodacyCoverageReporter.sh
|
||||
chmod +x CodacyCoverageReporter.sh
|
||||
./CodacyCoverageReporter.sh report -r cobertura.xml -t $CODACY_API_TOKEN
|
||||
|
||||
31
.github/workflows/pypi-publish.yml
vendored
Normal file
31
.github/workflows/pypi-publish.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
name: "PYPI Publish"
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Install build
|
||||
run: >-
|
||||
python -m pip install build --user
|
||||
|
||||
- name: Build a binary wheel and a source tarball
|
||||
run: >-
|
||||
python -m build --sdist --wheel --outdir dist/ .
|
||||
|
||||
- name: Publish distribution to PyPI
|
||||
if: startsWith(github.ref, 'refs/tags')
|
||||
uses: pypa/gh-action-pypi-publish@master
|
||||
with:
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
26
.github/workflows/sphinx-build.yml
vendored
Normal file
26
.github/workflows/sphinx-build.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: "Documentation Deploy"
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Create the new documentation
|
||||
uses: ammaraskar/sphinx-action@master
|
||||
with:
|
||||
pre-build-command: "python -m pip .[docs]"
|
||||
docs-folder: "docs/"
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
#deploy_key: ${{ secrets.DEPLOY_PRIVATE_KEY }}
|
||||
publish_dir: ./docs/build/html
|
||||
allow_empty_commit: true
|
||||
34
.github/workflows/testing_pr.yml
vendored
Normal file
34
.github/workflows/testing_pr.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
name: "Testing Pull Request"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "master"
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest, macos-latest, ubuntu-latest]
|
||||
python-version: [3.7, 3.8]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install .[test]
|
||||
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
python3 -m pytest
|
||||
Reference in New Issue
Block a user