-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
README + automations + add unittests
- Loading branch information
Showing
29 changed files
with
1,465 additions
and
67 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,19 @@ | ||
# This workflow will generate a distribution and upload it to PyPI | ||
|
||
name: Push dev -> master | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_and_publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | ||
ref: dev | ||
- name: Push dev -> master | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: master |
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,34 @@ | ||
name: Run Install Tests | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- dev | ||
workflow_dispatch: | ||
|
||
jobs: | ||
install: | ||
strategy: | ||
max-parallel: 2 | ||
matrix: | ||
python-version: [ 3.7, 3.8, 3.9, "3.10" ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Build Tools | ||
run: | | ||
python -m pip install build wheel | ||
- name: Install System Dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt install python3-dev swig libssl-dev | ||
- name: Build Distribution Packages | ||
run: | | ||
python setup.py bdist_wheel | ||
- name: Install package | ||
run: | | ||
pip install .[all] |
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,15 +1,18 @@ | ||
name: Run License Tests | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- dev | ||
workflow_dispatch: | ||
|
||
jobs: | ||
license_tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
|
@@ -24,12 +27,18 @@ jobs: | |
- name: Install core repo | ||
run: | | ||
pip install . | ||
- name: Install licheck | ||
run: | | ||
pip install git+https://github.com/NeonJarbas/lichecker | ||
- name: Install test dependencies | ||
- name: Get explicit and transitive dependencies | ||
run: | | ||
pip install pytest pytest-timeout pytest-cov | ||
- name: Test Licenses | ||
run: | | ||
pytest test/license_tests.py | ||
pip freeze > requirements-all.txt | ||
- name: Check python | ||
id: license_check_report | ||
uses: pilosus/[email protected] | ||
with: | ||
requirements: 'requirements-all.txt' | ||
fail: 'Copyleft,Other,Error' | ||
fails-only: true | ||
exclude: '^(tqdm).*' | ||
exclude-license: '^(Mozilla).*$' | ||
- name: Print report | ||
if: ${{ always() }} | ||
run: echo "${{ steps.license_check_report.outputs.report }}" |
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,23 @@ | ||
name: Close Pull Request | ||
|
||
# only trigger on pull request closed events | ||
on: | ||
pull_request: | ||
types: [ closed ] | ||
|
||
jobs: | ||
merge_job: | ||
# this job will only run if the PR has been merged | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Send message to Matrix bots channel | ||
id: matrix-chat-message | ||
uses: fadenb/[email protected] | ||
with: | ||
homeserver: 'matrix.org' | ||
token: ${{ secrets.MATRIX_TOKEN }} | ||
channel: '!WjxEKjjINpyBRPFgxl:krbel.duckdns.org' | ||
message: | | ||
new ovos-config PR merged! https://github.com/OpenVoiceOS/ovos-config/pull/${{ github.event.number }} |
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,75 @@ | ||
# This workflow will generate a distribution and upload it to PyPI | ||
# This will always use the current `dev` branch code | ||
|
||
name: Publish Alpha Build ...aX | ||
on: | ||
push: | ||
branches: | ||
- dev | ||
paths-ignore: | ||
- 'ovos_audio/version.py' | ||
- 'test/**' | ||
- 'examples/**' | ||
- '.github/**' | ||
- '.gitignore' | ||
- 'LICENSE' | ||
- 'CHANGELOG.md' | ||
- 'MANIFEST.in' | ||
- 'readme.md' | ||
- 'scripts/**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_and_publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: dev | ||
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | ||
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
- name: Install Build Tools | ||
run: | | ||
python -m pip install build wheel | ||
- name: Increment Version | ||
run: | | ||
VER=$(python setup.py --version) | ||
python scripts/bump_alpha.py | ||
- name: "Generate release changelog" | ||
uses: heinrichreimer/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
maxIssues: 50 | ||
id: changelog | ||
- name: Commit to dev | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Increment Version | ||
branch: dev | ||
- name: version | ||
run: echo "::set-output name=version::$(python setup.py --version)" | ||
id: version | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
tag_name: V${{ steps.version.outputs.version }} | ||
release_name: Release ${{ steps.version.outputs.version }} | ||
body: | | ||
Changes in this Release | ||
${{ steps.changelog.outputs.changelog }} | ||
draft: false | ||
prerelease: true | ||
commitish: dev | ||
- name: Build Distribution Packages | ||
run: | | ||
python setup.py bdist_wheel | ||
- name: Publish to Test PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{secrets.PYPI_TOKEN}} |
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,87 @@ | ||
# This workflow will generate a distribution and upload it to PyPI | ||
# This will always use the current `dev` branch code | ||
|
||
name: Publish Build Release ..X | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_and_publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: dev | ||
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | ||
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
- name: Install Build Tools | ||
run: | | ||
python -m pip install build wheel | ||
- name: Remove alpha (declare stable) | ||
run: | | ||
VER=$(python setup.py --version) | ||
python scripts/remove_alpha.py | ||
- name: "Generate release changelog" | ||
uses: heinrichreimer/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
id: changelog | ||
- name: Commit to dev | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Declare alpha stable | ||
branch: dev | ||
- name: Push dev -> master | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: master | ||
force: true | ||
- name: version | ||
run: echo "::set-output name=version::$(python setup.py --version)" | ||
id: version | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
tag_name: V${{ steps.version.outputs.version }} | ||
release_name: Release ${{ steps.version.outputs.version }} | ||
body: | | ||
Changes in this Release | ||
${{ steps.changelog.outputs.changelog }} | ||
draft: false | ||
prerelease: false | ||
commitish: dev | ||
- name: Build Distribution Packages | ||
run: | | ||
python setup.py bdist_wheel | ||
- name: Prepare next Build version | ||
run: echo "::set-output name=version::$(python setup.py --version)" | ||
id: alpha | ||
- name: Increment Version ${{ steps.alpha.outputs.version }}Alpha0 | ||
run: | | ||
VER=$(python setup.py --version) | ||
python scripts/bump_build.py | ||
- name: Commit to dev | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Prepare Next Version | ||
branch: dev | ||
- name: Publish to Test PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{secrets.PYPI_TOKEN}} | ||
- name: Send message to Matrix bots channel | ||
id: matrix-chat-message | ||
uses: fadenb/[email protected] | ||
with: | ||
homeserver: 'matrix.org' | ||
token: ${{ secrets.MATRIX_TOKEN }} | ||
channel: '!WjxEKjjINpyBRPFgxl:krbel.duckdns.org' | ||
message: | | ||
New ovos-config release! ${{ steps.version.outputs.version }} |
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,87 @@ | ||
# This workflow will generate a distribution and upload it to PyPI | ||
# This will always use the current `dev` branch code and push it to `master` | ||
|
||
name: Publish Major Release X.0.0 | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_and_publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: dev | ||
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | ||
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
- name: Install Build Tools | ||
run: | | ||
python -m pip install build wheel | ||
- name: Remove alpha (declare stable) | ||
run: | | ||
VER=$(python setup.py --version) | ||
python scripts/remove_alpha.py | ||
- name: "Generate release changelog" | ||
uses: heinrichreimer/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
id: changelog | ||
- name: Commit to dev | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Declare alpha stable | ||
branch: dev | ||
- name: Push dev -> master | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: master | ||
force: true | ||
- name: version | ||
run: echo "::set-output name=version::$(python setup.py --version)" | ||
id: version | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
tag_name: V${{ steps.version.outputs.version }} | ||
release_name: Release ${{ steps.version.outputs.version }} | ||
body: | | ||
Changes in this Release | ||
${{ steps.changelog.outputs.changelog }} | ||
draft: false | ||
prerelease: false | ||
commitish: master | ||
- name: Build Distribution Packages | ||
run: | | ||
python setup.py bdist_wheel | ||
- name: Prepare next Major version | ||
run: echo "::set-output name=version::$(python setup.py --version)" | ||
id: alpha | ||
- name: Increment Version ${{ steps.alpha.outputs.version }}Alpha0 | ||
run: | | ||
VER=$(python setup.py --version) | ||
python scripts/bump_major.py | ||
- name: Commit to dev | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Prepare Next Version | ||
branch: dev | ||
- name: Publish to Test PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{secrets.PYPI_TOKEN}} | ||
- name: Send message to Matrix bots channel | ||
id: matrix-chat-message | ||
uses: fadenb/[email protected] | ||
with: | ||
homeserver: 'matrix.org' | ||
token: ${{ secrets.MATRIX_TOKEN }} | ||
channel: '!WjxEKjjINpyBRPFgxl:krbel.duckdns.org' | ||
message: | | ||
New ovos-config release! ${{ steps.version.outputs.version }} |
Oops, something went wrong.