Skip to content

Commit

Permalink
Merge pull request #4 from infra-blue/fixedpipeline
Browse files Browse the repository at this point in the history
fix: fixed some errors in the pipeline
  • Loading branch information
infra-blue authored Nov 5, 2023
2 parents 1c9152f + 273b714 commit 16b7467
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 63 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/doc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Create and publish a Docker image
on:
push:
branches:
- "master"
- "main"

jobs:
build:
Expand Down
39 changes: 15 additions & 24 deletions .github/workflows/telegram-bot.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,42 @@
name: DMI_bot_deploy
name: Development pipeline

on:
push:
branches: [master]
paths-ignore:
- ".gitignore"
- "README.md"
- "docs/**"
pull_request:
branches: [master]
paths-ignore:
- ".gitignore"
- "README.md"
- "docs/**"

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11", "3.12"]

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies for requirements and testing
python-version: ${{ matrix.python-version }}
- name: Install dependencies
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: Lint with flake8
- name: Setup environment
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
mv config/settings.yaml.dist config/settings.yaml
- name: Lint with pylint
run: |
pylint main.py setup.py module
# - name: Setup enviroment
pylint main.py module
# - name: Test with pytest
# 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: Unit test
run: pytest tests/unit/
# - name: End-to-end test
# run: pytest tests/e2e/
# pytest tests/unit/

0 comments on commit 16b7467

Please sign in to comment.