Skip to content

Commit

Permalink
feat(ci): Use Poetry and Black
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixpereira committed May 13, 2024
1 parent 2669562 commit d7fdde1
Show file tree
Hide file tree
Showing 6 changed files with 679 additions and 14 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Format Code

on:
pull_request:
branches:
- '*'
push:
branches: [main]

jobs:
black:
name: Black
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Format code with Black
run: poetry run black .

- name: Check for changes
run: git diff --exit-code
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,30 @@ DuckBot is a Discord bot written in Python using the discord.py library for the

To get started, please follow these steps:

1. Install the dependencies.
1. Install Poetry if not already installed:

```bash
pip install -r requirements.txt
curl -sSL https://install.python-poetry.org | python3 -
```

2. Copy `.env.example` to a new file `.env` and set required environment variables.
2. Install the dependencies.

3. Navigate to the src directory
```bash
poetry install
```

3. Copy `.env.example` to a new file `.env` and set required environment variables.

4. Navigate to the src directory

```bash
cd src
```

4. Run the bot.
5. Run the bot.

```bash
python main.py
poetry run python main.py
```

## Contributing
Expand Down
Loading

0 comments on commit d7fdde1

Please sign in to comment.