diff --git a/.github/environment.yml b/.github/environment.yml deleted file mode 100644 index c2e396a..0000000 --- a/.github/environment.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: testenv -channels: - - conda-forge - - defaults -dependencies: - - python=3.10 - - pip - - pip: - - python-telegram-bot diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml new file mode 100644 index 0000000..f52803d --- /dev/null +++ b/.github/workflows/ci-cd.yml @@ -0,0 +1,18 @@ +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: pip install -r requirements.txt + - name: Run script + env: + TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} + SERVER_IP: ${{ secrets.SERVER_IP }} + SERVER_PORT: ${{ secrets.SERVER_PORT }} + run: python script.py diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml deleted file mode 100644 index c73e032..0000000 --- a/.github/workflows/pylint.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Pylint - -on: [push] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.8", "3.9", "3.10"] - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install pylint - - name: Analysing the code with pylint - run: | - pylint $(git ls-files '*.py') diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml deleted file mode 100644 index 7d3df93..0000000 --- a/.github/workflows/python-package-conda.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Python Package using Conda - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: [3.10] # You can add more versions here - - steps: - - uses: actions/checkout@v4 - - name: Setup Conda - uses: conda-incubator/setup-miniconda@v2 - with: - python-version: ${{ matrix.python-version }} - environment-file: environment.yml - activate-environment: myenv - auto-activate-base: false - - - name: Install Dependencies - run: | - conda install pip # Make sure pip is installed in the Conda environment - pip install -r requirements.txt # If you have additional pip requirements - - - name: Lint with flake8 - run: | - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 - - - name: Test with pytest - run: | - pytest diff --git a/grouphug.py b/grouphug.py index c8fda8c..1203e22 100644 --- a/grouphug.py +++ b/grouphug.py @@ -4,6 +4,7 @@ import bitcoin import asyncio import socket +import os async def start(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: await update.message.reply_text('Send me a Bitcoin transaction in raw format.')