-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
01a6b1e
commit 6d318ac
Showing
14 changed files
with
171 additions
and
21 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,48 @@ | ||
name: Python Integration Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
- staging | ||
- main | ||
paths-ignore: | ||
- version | ||
pull_request: | ||
branches: | ||
- dev | ||
- staging | ||
- main | ||
paths-ignore: | ||
- version | ||
|
||
jobs: | ||
test: | ||
name: Integration Tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9"] | ||
|
||
steps: | ||
- name: Checkout | ||
if: ${{ github.event_name == 'pull_request'}} | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
- name: Checkout | ||
if: ${{ github.event_name == 'push'}} | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.ref_name }} | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m venv venv_test | ||
source venv_test/bin/activate | ||
python -m pip install -r requirements_test.txt | ||
- name: Test with pytest | ||
run: | | ||
source venv_test/bin/activate | ||
pytest ./tests/integration -vvs |
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,47 @@ | ||
# This workflow will lint all files in repo using pylint | ||
|
||
name: pylint | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
- staging | ||
- main | ||
paths-ignore: | ||
- version | ||
pull_request: | ||
branches: | ||
- dev | ||
- staging | ||
- main | ||
paths-ignore: | ||
- version | ||
|
||
jobs: | ||
lint: | ||
name: Linter | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9"] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Dependencies | ||
run: | | ||
git config --global url."https://${{ secrets.BOT_OSENSA_TOKEN }}@github".insteadOf ssh://git@github | ||
python -m pip install --upgrade pip | ||
python -m venv venv_test | ||
source venv_test/bin/activate | ||
python -m pip install -r requirements_test.txt | ||
- name: Analysing the code with pylint | ||
run: | | ||
source venv_test/bin/activate | ||
pylint $(git ls-files '*.py') |
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,45 @@ | ||
name: PyTest Unit Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
- staging | ||
- main | ||
paths-ignore: | ||
- version | ||
pull_request: | ||
branches: | ||
- dev | ||
- staging | ||
- main | ||
paths-ignore: | ||
- version | ||
|
||
jobs: | ||
test: | ||
name: Unit Tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9"] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Dependencies | ||
run: | | ||
git config --global url."https://${{ secrets.BOT_OSENSA_TOKEN }}@github".insteadOf ssh://git@github | ||
python -m pip install --upgrade pip | ||
python -m venv venv_test | ||
source venv_test/bin/activate | ||
python -m pip install -r requirements_test.txt | ||
- name: Test with pytest | ||
run: | | ||
source venv_test/bin/activate | ||
pytest ./tests/unit -vvs |
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,4 +1,3 @@ | ||
"""Client to use for integration tests""" | ||
import logging | ||
from google.protobuf import service | ||
import zmq | ||
|
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
protobuf==3.20.3 | ||
python-periphery==2.4.1 | ||
pyzmq==25.1.0 | ||
edgepi-python-sdk==1.2.6 | ||
edgepi-rpc-protobuf==1.0.15 |
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,3 @@ | ||
-r requirements.txt | ||
pylint==2.17.4 | ||
pytest==7.3.1 |
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