Skip to content

Notify admin on Gitlab exception raised getting groups #126

Notify admin on Gitlab exception raised getting groups

Notify admin on Gitlab exception raised getting groups #126

Workflow file for this run

name: DMI_bot_deploy
on:
push:
branches: [master]
paths-ignore:
- "README.md"
- "docs/**"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8.5
uses: actions/setup-python@v2
with:
python-version: 3.8.5
- name: Install dependencies for requirements and testing
run: |
python -m pip install --upgrade pip
pip install flake8
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements_dev.txt ]; then pip install -r requirements_dev.txt; fi
- name: Setup enviroment
run: |
mv config/settings.yaml.dist config/settings.yaml
mv data/DMI_DB.db.dist data/DMI_DB.db
python3 setup.py useless_token --test_api_id ${{secrets.API_ID}} \
--test_api_hash ${{secrets.API_HASH}} --test_session ${{secrets.SESSION}} \
--test_tag ${{secrets.TEST_TAG}} --test_token ${{secrets.TEST_TOKEN}} \
--test_representatives_group ${{secrets.TEST_USER_ID}} --test_dev_group_chatid ${{secrets.TEST_USER_ID}}
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
doc:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8.5
uses: actions/setup-python@v2
with:
python-version: 3.8.5
- name: Install dependencies for requirements and testing
run: |
python -m pip install --upgrade pip
pip install sphinx sphinx_rtd_theme sphinx_autodoc_typehints
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements_dev.txt ]; then pip install -r requirements_dev.txt; fi
- name: Setup enviroment
run: |
mv config/settings.yaml.dist config/settings.yaml
mv data/DMI_DB.db.dist data/DMI_DB.db
- name: Sphinx build
run: |
sphinx-build -b html docs/source docs/build/docs
echo "# Telegram DMI bot documentation" > docs/build/README.md
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs/build