Skip to content

Commit

Permalink
Merge pull request #175 from NeonGeckoCom/dev
Browse files Browse the repository at this point in the history
Neon Core 22.05
  • Loading branch information
NeonDaniel authored May 10, 2022
2 parents 611ec32 + e6f6882 commit 2a6d8a6
Show file tree
Hide file tree
Showing 103 changed files with 3,555 additions and 2,685 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/license_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Run License Tests
on:
push:
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:
python-version: 3.8
- name: Install Build Tools
run: |
python -m pip install build wheel
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt install gcc libfann-dev swig libssl-dev portaudio19-dev git libpulse-dev
- name: Install core repo
run: |
pip install .
- name: Install licheck
run: |
pip install git+https://github.com/NeonJarbas/lichecker
- name: Install test dependencies
run: |
pip install pytest pytest-timeout pytest-cov
- name: Test Licenses
run: |
pytest test/license_tests.py
60 changes: 60 additions & 0 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
branches:
- master

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/neon_skills

jobs:
tag_release:
runs-on: ubuntu-latest
Expand All @@ -19,3 +23,59 @@ jobs:
with:
token: ${{secrets.GITHUB_TOKEN}}
tag: ${{env.VERSION}}
build_and_publish_docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Get Version
id: version
run: |
VERSION=$(sed "s/a/-a./" <<< $(python setup.py --version))
echo ::set-output name=version::${VERSION}
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for base Docker
id: meta
uses: docker/metadata-action@v2
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}},value=${{ steps.version.outputs.version }}
type=ref,event=branch
- name: Build and push base Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
target: base

- name: Extract metadata for default_skills Docker
id: meta
uses: docker/metadata-action@v2
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-default_skills
tags: |
type=semver,pattern={{version}},value=${{ steps.version.outputs.version }}
type=ref,event=branch
- name: Build and push default_skills Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
target: default_skills
63 changes: 62 additions & 1 deletion .github/workflows/publish_test_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ on:
paths-ignore:
- 'version.py'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/neon_skills

jobs:
build_and_publish:
increment_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -30,3 +34,60 @@ jobs:
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Increment Version
build_and_publish_docker:
runs-on: ubuntu-latest
needs: increment_version
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Get Version
id: version
run: |
VERSION=$(sed "s/a/-a./" <<< $(python setup.py --version))
echo ::set-output name=version::${VERSION}
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for base Docker
id: base_meta
uses: docker/metadata-action@v2
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}},value=${{ steps.version.outputs.version }}
type=ref,event=branch
- name: Build and push base Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.base_meta.outputs.tags }}
labels: ${{ steps.base_meta.outputs.labels }}
target: base

- name: Extract metadata for default_skills Docker
id: default_skills_meta
uses: docker/metadata-action@v2
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-default_skills
tags: |
type=semver,pattern={{version}},value=${{ steps.version.outputs.version }}
type=ref,event=branch
- name: Build and push default_skills Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.default_skills_meta.outputs.tags }}
labels: ${{ steps.default_skills_meta.outputs.labels }}
target: default_skills
26 changes: 17 additions & 9 deletions .github/workflows/setup_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
remote:
strategy:
matrix:
python-version: [ 3.6, 3.7, 3.8 ]
python-version: [ 3.7, 3.9 ]
runs-on: ubuntu-latest
timeout-minutes: 20
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Set up python ${{ matrix.python-version }}
Expand All @@ -29,28 +29,29 @@ jobs:
GOOGLE_KEY: ${{secrets.google_api_key}}
AWS_CREDS: ${{secrets.amazon_creds}}
- name: Test Core Setup
timeout-minutes: 10
run: |
. test/.venv/bin/activate
pytest test/test_setup_remote.py --junitxml=tests/remote-setup-results.xml
pytest test/test_run_neon.py --junitxml=tests/remote-test-results.xml
- name: Upload Core Setup test results
uses: actions/upload-artifact@v2
with:
name: pytest-results-3.6
name: pytest-results-remote-${{ matrix.python-version }}
path: tests/remote-test-results.xml
if: ${{ always() }}
if: always()
- name: Upload Core Setup logs
uses: actions/upload-artifact@v2
with:
name: pytest-results-3.6
name: core-logs-remote-${{ matrix.python-version }}
path: ~/.local/share/neon/logs/*.log
if: ${{ always() }}
if: always()
dev_local:
strategy:
matrix:
python-version: [ 3.8 ]
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Set up python ${{ matrix.python-version }}
Expand All @@ -63,6 +64,7 @@ jobs:
env:
NEON_TOKEN: ${{secrets.neon_token}}
- name: Test Core Setup
timeout-minutes: 10
run: |
. test/.venv/bin/activate
pip install pytest pytest-timeout
Expand All @@ -71,6 +73,12 @@ jobs:
- name: Upload Core Setup test results
uses: actions/upload-artifact@v2
with:
name: pytest-results-3.6
name: pytest-results-local-${{ matrix.python-version }}
path: tests/dev_local-test-results.xml
if: ${{ always() }}
if: always()
- name: Upload Core Setup logs
uses: actions/upload-artifact@v2
with:
name: core-logs-dev-local-${{ matrix.python-version }}
path: test/logs/*.log
if: always()
75 changes: 64 additions & 11 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflow will run unit tests

name: Test Utilities
name: Test Core Modules
on:
push:
workflow_dispatch:
Expand All @@ -26,7 +26,7 @@ jobs:
util_tests:
strategy:
matrix:
python-version: [ 3.6, 3.7, 3.8 ]
python-version: [ 3.6, 3.7, 3.8, 3.9 ]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
Expand All @@ -39,23 +39,46 @@ jobs:
run: |
sudo apt update
sudo apt install -y gcc libfann-dev swig libssl-dev portaudio19-dev git libpulse-dev
pip install -r requirements/requirements.txt
pip install -r requirements/test.txt
pip install wheel
pip install . -r requirements/test.txt
env:
GITHUB_TOKEN: ${{secrets.neon_token}}

- name: Test Skill Utils
run: |
pytest test/test_skill_utils.py
pytest test/test_skill_utils.py --doctest-modules --junitxml=tests/skill-utils-test-results.xml
env:
GITHUB_TOKEN: ${{secrets.neon_token}}
- name: Test Language
- name: Upload Skill Utils test results
uses: actions/upload-artifact@v2
with:
name: skill-utils-test-results
path: tests/skill-utils-test-results.xml

- name: Test Diagnostic Utils
run: |
pytest test/test_diagnostic_utils.py --doctest-modules --junitxml=tests/diagnostic-utils-test-results.xml
env:
GITHUB_TOKEN: ${{secrets.neon_token}}
- name: Upload Diagnostic Utils test results
uses: actions/upload-artifact@v2
with:
name: diagnostic-utils-test-results
path: tests/diagnostic-utils-test-results.xml

- name: Test QML File Server
run: |
pytest test/test_language.py
pytest test/test_qml_file_server.py --doctest-modules --junitxml=tests/qml-file-server-test-results.xml
- name: Upload QML File Server test results
uses: actions/upload-artifact@v2
with:
name: qml-file-server-test-results
path: tests/qml-file-server-test-results.xml

unit_tests:
strategy:
matrix:
python-version: [ 3.6, 3.7, 3.8 ]
python-version: [ 3.6, 3.7, 3.8, 3.9, '3.10' ]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
Expand All @@ -68,10 +91,40 @@ jobs:
run: |
sudo apt update
sudo apt install -y gcc libfann-dev swig libssl-dev portaudio19-dev git libpulse-dev
pip install -r requirements/requirements.txt
pip install -r requirements/test.txt
pip install wheel
pip install . -r requirements/test.txt
env:
GITHUB_TOKEN: ${{secrets.neon_token}}

- name: Test Configuration Module
run: |
pytest test/test_configuration.py
pytest test/test_configuration.py --doctest-modules --junitxml=tests/configuration-test-results.xml
- name: Upload Configuration test results
uses: actions/upload-artifact@v2
with:
name: configuration-test-results
path: tests/configuration-test-results.xml
- name: Upload config file
uses: actions/upload-artifact@v2
with:
name: ovos.conf
path: ~/.config/OpenVoiceOS/ovos.conf
if: always()

- name: Test Language
run: |
pytest test/test_language.py --doctest-modules --junitxml=tests/language-test-results.xml
- name: Upload Language test results
uses: actions/upload-artifact@v2
with:
name: language-test-results
path: tests/language-test-results.xml

- name: Test Skills Module
run: |
pytest test/test_skills_module.py --doctest-modules --junitxml=tests/skills-module-test-results.xml
- name: Upload Language test results
uses: actions/upload-artifact@v2
with:
name: skills-module-test-results
path: tests/skills-module-test-results.xml
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ doc/_build/
test/unittests/skills/test_skill/settings.json
test_conf.json
.pytest_cache/

# Neon dev files
.*.tmp
./ngi*.yml
Loading

0 comments on commit 2a6d8a6

Please sign in to comment.