Skip to content

Commit

Permalink
v2.0.16
Browse files Browse the repository at this point in the history
  • Loading branch information
ddc committed Dec 28, 2024
1 parent 3c882da commit ce5b87e
Show file tree
Hide file tree
Showing 7 changed files with 508 additions and 380 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,28 @@ jobs:

- name: Install Poetry
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade pip
python -m pip install poetry
- name: Install Poetry Dependencies
- name: Install poetry dependencies
run: |
python -m poetry update --with test
# - name: Run tests
# run: |
# python -m poetry run coverage run --omit=./tests/* -m pytest -v
#
# - name: Generate Coverage Report
# run: |
# python -m poetry run coverage report
# python -m poetry run coverage xml
#
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v5
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# slug: ddc/DiscordBot

release:
runs-on: ubuntu-latest
needs:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ dist/
*.pyc
*.manifest
.env
/.coverage
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN set -ex && \
apt-get purge curl -y && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
rm -rf /var/cache/apt/archives /var/lib/apt/lists/*

COPY config ${WORKDIR}/config
COPY src ${WORKDIR}/src
Expand Down
7 changes: 6 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
POSTGRES_PASSWORD: ${POSTGRESQL_PASSWORD}
POSTGRES_DB: ${POSTGRESQL_DATABASE}
volumes:
- ./postgresql_data:/var/lib/postgresql/data:rw
- bot_db_data:/var/lib/postgresql/data:rw
ports:
- ${POSTGRESQL_PORT}:${POSTGRESQL_PORT}
expose:
Expand Down Expand Up @@ -57,3 +57,8 @@ services:
depends_on:
- alembic
command: ["python", "/app/bot.py"]


volumes:
bot_db_data:
name: "bot_db_data"
828 changes: 453 additions & 375 deletions poetry.lock

Large diffs are not rendered by default.

15 changes: 14 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "DiscordBot"
version = "2.0.15"
version = "2.0.16"
description = "A Bot for Discord"
license = "MIT"
readme = "README.md"
Expand Down Expand Up @@ -45,5 +45,18 @@ urllib3 = "^2.2.3"
[tool.poetry.group.test.dependencies]
coverage = "^7.6.8"
faker = "^33.1.0"
poethepoet = "^0.31.1"
pytest = "^8.3.4"
pytest-asyncio = "^0.24.0"

[tool.coverage.run]
omit = [
"tests/*",
]

[tool.poe.tasks]
_test = "coverage run -m pytest -v"
_coverage_report = "coverage report"
_coverage_xml = "coverage xml"
tests = ["_test", "_coverage_report", "_coverage_xml"]
test = ["tests"]
16 changes: 16 additions & 0 deletions utilities/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

PROJECT_DIR=/opt/DiscordBot
PROJECT_USERNAME=ddc

pushd "$PROJECT_DIR" || exit

# update project
git fetch --all
git reset --hard origin/master

# change perms
sudo chown -R $PROJECT_USERNAME:$PROJECT_USERNAME "$PROJECT_DIR" && \
sudo chmod -R 0755 "$PROJECT_DIR"

popd || exit

0 comments on commit ce5b87e

Please sign in to comment.