-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
187 changed files
with
5,981 additions
and
2,856 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,112 @@ | ||
# 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 | ||
|
||
name: Check and publish | ||
|
||
on: | ||
|
||
workflow_dispatch: {} | ||
|
||
pull_request: | ||
branches: [master] | ||
|
||
release: | ||
types: [created] | ||
|
||
jobs: | ||
|
||
quality: | ||
name: Code QA | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: pip install black flake8 isort | ||
- run: black --version | ||
- run: isort --check . | ||
- run: black --check . | ||
- run: flake8 . | ||
|
||
checks: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: ["ubuntu-latest"] | ||
python-version: ["3.6", "3.7", "3.8", "3.9"] | ||
|
||
name: Python ${{ matrix.python-version }} on ${{ matrix.platform }} | ||
runs-on: ${{ matrix.platform }} | ||
needs: quality | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install etcd | ||
run: | | ||
ETCD_VER=v3.4.14 | ||
DOWNLOAD_URL=https://github.com/etcd-io/etcd/releases/download | ||
curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz -o /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz | ||
mkdir /tmp/etcd-download-test | ||
tar xzvf /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -C /tmp/etcd-download-test --strip-components=1 | ||
/tmp/etcd-download-test/etcd & | ||
- name: Install packages | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel | ||
pip install -e . | ||
pip install -e aviso-server/monitoring | ||
pip install -e aviso-server/rest | ||
pip install -e aviso-server/auth | ||
pip install -e aviso-server/admin | ||
pip install -U -r tests/requirements-dev.txt | ||
pip install -r docs/requirements.txt | ||
- name: Tests | ||
run: | | ||
pip freeze | ||
pytest | ||
env: | ||
AVISO_DEBUG: True | ||
|
||
- name: Documentation | ||
run: | | ||
make clean | ||
make html | ||
working-directory: docs | ||
|
||
deploy: | ||
if: ${{ github.event_name == 'release' }} | ||
|
||
name: Upload to Pypi | ||
needs: checks | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Check version | ||
run: | | ||
release=${GITHUB_REF##*/} | ||
version=$(python setup.py --version) | ||
test "$release" == "$version" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* |
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,69 @@ | ||
name: Check | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
push: | ||
branches: [develop] | ||
|
||
jobs: | ||
|
||
quality: | ||
name: Code QA | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: pip install black flake8 isort | ||
- run: black --version | ||
- run: isort --check . | ||
- run: black --check . | ||
- run: flake8 . | ||
|
||
checks: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: ["ubuntu-latest"] | ||
python-version: ["3.6", "3.7", "3.8", "3.9"] | ||
|
||
name: Python ${{ matrix.python-version }} on ${{ matrix.platform }} | ||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install etcd | ||
run: | | ||
ETCD_VER=v3.4.14 | ||
DOWNLOAD_URL=https://github.com/etcd-io/etcd/releases/download | ||
curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz -o /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz | ||
mkdir /tmp/etcd-download-test | ||
tar xzvf /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -C /tmp/etcd-download-test --strip-components=1 | ||
/tmp/etcd-download-test/etcd & | ||
- name: Install packages | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel | ||
pip install -e . | ||
pip install -e aviso-server/monitoring | ||
pip install -e aviso-server/rest | ||
pip install -e aviso-server/auth | ||
pip install -e aviso-server/admin | ||
pip install -U -r tests/requirements-dev.txt | ||
pip install -r docs/requirements.txt | ||
- name: Tests | ||
run: | | ||
pytest -v --cov=pyaviso --cache-clear | ||
env: | ||
AVISO_DEBUG: True | ||
- name: Documentation | ||
run: | | ||
make clean | ||
make html | ||
working-directory: docs |
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
.* | ||
!.gitignore | ||
!.dockerignore | ||
venvDev*/* | ||
!.github | ||
__pycache* | ||
htmlcov | ||
pyaviso.egg-info/* | ||
|
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
include pyaviso/event_listeners/default_listener_schema.json | ||
include pyaviso/event_listeners/default_listener_schema.json | ||
include requirements.txt |
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
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
Oops, something went wrong.