2019-09-18 20:34:44 +01:00
|
|
|
name: Daemon Checks
|
|
|
|
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2022-10-13 05:35:22 +01:00
|
|
|
runs-on: ubuntu-22.04
|
2019-09-18 20:34:44 +01:00
|
|
|
steps:
|
2019-09-18 20:38:38 +01:00
|
|
|
- uses: actions/checkout@v1
|
2022-10-13 05:35:22 +01:00
|
|
|
- name: Set up Python 3.9
|
2019-09-18 20:38:38 +01:00
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
2022-10-13 05:35:22 +01:00
|
|
|
python-version: 3.9
|
2020-07-12 00:17:50 +01:00
|
|
|
- name: install poetry
|
2019-09-18 20:38:38 +01:00
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
2020-07-12 00:17:50 +01:00
|
|
|
pip install poetry
|
2019-09-18 20:38:38 +01:00
|
|
|
cd daemon
|
2019-10-30 22:44:57 +00:00
|
|
|
cp core/constants.py.in core/constants.py
|
2020-06-23 17:24:40 +01:00
|
|
|
sed -i 's/required=True/required=False/g' core/emulator/coreemu.py
|
2020-07-12 00:17:50 +01:00
|
|
|
poetry install
|
2019-09-18 20:38:38 +01:00
|
|
|
- name: isort
|
|
|
|
run: |
|
|
|
|
cd daemon
|
2020-07-12 00:17:50 +01:00
|
|
|
poetry run isort -c -df
|
2019-09-18 20:38:38 +01:00
|
|
|
- name: black
|
|
|
|
run: |
|
|
|
|
cd daemon
|
2020-07-14 21:33:40 +01:00
|
|
|
poetry run black --check .
|
2019-09-18 20:38:38 +01:00
|
|
|
- name: flake8
|
|
|
|
run: |
|
|
|
|
cd daemon
|
2020-07-12 00:17:50 +01:00
|
|
|
poetry run flake8
|
2019-10-30 22:44:57 +00:00
|
|
|
- name: grpc
|
|
|
|
run: |
|
|
|
|
cd daemon/proto
|
2020-07-12 00:17:50 +01:00
|
|
|
poetry run python -m grpc_tools.protoc -I . --python_out=.. --grpc_python_out=.. core/api/grpc/*.proto
|
2019-10-30 22:44:57 +00:00
|
|
|
- name: test
|
|
|
|
run: |
|
|
|
|
cd daemon
|
2020-07-12 00:17:50 +01:00
|
|
|
poetry run pytest --mock tests
|