Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jr0013909 patch 4 #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Docker Image CI

on:
push:
branches: [ "jr0013909-patch-4" ]
pull_request:
branches: [ "jr0013909-patch-4" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
docker run --rm my-image my-image-test-command
23 changes: 23 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Pylint

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- 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')
4 changes: 2 additions & 2 deletions dbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async def on_ready(self):
print('Logged on as {0}!'.format(self.user))

async def on_message(self, message):
print('Message from {0.author}: {0.content}'.format(message))
print('Message*** from {0.author}: {0.content}'.format(message))
if message.author == client.user: return
if message.content == '!stop': await client.logout()
#if message.content.startswith('!ping'): await message.channel.send('Pong!')
Expand All @@ -35,4 +35,4 @@ async def on_member_join(self, member):
await member.send(join_greeting)

client = MyClient()
client.run(token)
client.run(token)