2019-09-18 20:34:44 +01:00
|
|
|
name: Daemon Checks
|
|
|
|
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2019-09-18 20:56:24 +01:00
|
|
|
runs-on: ubuntu-18.04
|
2019-09-18 20:34:44 +01:00
|
|
|
steps:
|
2019-09-18 20:38:38 +01:00
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Set up Python 3.7
|
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
|
|
|
python-version: 3.7
|
|
|
|
- name: Install pipenv
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install pipenv
|
|
|
|
cd daemon
|
2019-09-19 16:30:20 +01:00
|
|
|
cp setup.py.in setup.py
|
2019-10-30 22:44:57 +00:00
|
|
|
cp core/constants.py.in core/constants.py
|
|
|
|
sed -i 's/True/False/g' core/constants.py
|
2020-03-30 18:36:39 +01:00
|
|
|
pipenv sync --dev
|
2019-09-18 20:38:38 +01:00
|
|
|
- name: isort
|
|
|
|
run: |
|
|
|
|
cd daemon
|
2020-03-30 18:31:36 +01:00
|
|
|
pipenv run isort -c -df
|
2019-09-18 20:38:38 +01:00
|
|
|
- name: black
|
|
|
|
run: |
|
|
|
|
cd daemon
|
2019-09-19 16:35:04 +01:00
|
|
|
pipenv run black --check --exclude ".+_pb2.*.py|doc|build|utm\.py|setup\.py" .
|
2019-09-18 20:38:38 +01:00
|
|
|
- name: flake8
|
|
|
|
run: |
|
|
|
|
cd daemon
|
|
|
|
pipenv run flake8
|
2019-10-30 22:44:57 +00:00
|
|
|
- name: grpc
|
|
|
|
run: |
|
|
|
|
cd daemon/proto
|
2020-01-19 05:23:46 +00:00
|
|
|
pipenv 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
|
|
|
|
pipenv run test --mock
|