From dd2805b7f0586d87b6163bfc18526f0af7c04750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Helle=C5=9Ben?= Date: Tue, 17 Mar 2026 20:56:50 +0100 Subject: [PATCH] Update debugging step in CI workflow to list all files with human-readable sizes --- .github/copilot-instructions.md | 12 +++++------ .../workflows/{docker-publish.yml => ci.yml} | 9 +++++--- Dockerfile | 21 ------------------- docker-compose.yml | 9 -------- 4 files changed, 12 insertions(+), 39 deletions(-) rename .github/workflows/{docker-publish.yml => ci.yml} (73%) delete mode 100644 Dockerfile delete mode 100644 docker-compose.yml diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 810d0c1..e43899f 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -14,7 +14,7 @@ ANewDawn is a Discord bot written in Python 3.13+ using the discord.py library a - **Python**: 3.13 or higher required - **Package Manager**: Use `uv` for dependency management (see `pyproject.toml`) -- **Docker**: The project uses Docker for deployment (see `Dockerfile` and `docker-compose.yml`) +- **Deployment**: The project is designed to run as a systemd service (see `systemd/anewdawn.service`) - **Environment Variables**: Copy `.env.example` to `.env` and fill in required tokens ## Code Style and Conventions @@ -57,7 +57,7 @@ ruff format --check --verbose - `main.py` - Main bot application with all commands and event handlers - `pyproject.toml` - Project configuration and dependencies -- `Dockerfile` / `docker-compose.yml` - Container configuration +- `systemd/` - systemd unit and environment templates - `.github/workflows/` - CI/CD workflows ## Key Components @@ -82,10 +82,10 @@ The main bot client is `LoviBotClient` which extends `discord.Client`. It handle ## CI/CD -The GitHub Actions workflow (`.github/workflows/docker-publish.yml`) runs: -1. Ruff linting and format check -2. Dockerfile validation -3. Docker image build and push to GitHub Container Registry +The GitHub Actions workflow (`.github/workflows/ci.yml`) runs: +1. Dependency install via `uv sync` +2. Ruff linting and format check +3. Unit tests via `pytest` ## Common Tasks diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/ci.yml similarity index 73% rename from .github/workflows/docker-publish.yml rename to .github/workflows/ci.yml index be0aa7b..6e69914 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,12 @@ jobs: steps: - uses: actions/checkout@v6 + - name: Print the local dir and list files for debugging + run: | + echo "Current directory: $(pwd)" + echo "Files in current directory:" + ls -ahl + - name: Install dependencies run: uv sync --all-extras --dev -U @@ -24,8 +30,5 @@ jobs: - name: Check formatting run: ruff format --check --verbose - - name: Lint Dockerfile (build only) - run: docker build --check . - - name: Run tests run: uv run pytest diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 5eeae3a..0000000 --- a/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -# syntax=docker/dockerfile:1 -# check=error=true;experimental=all -FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim - -# Change the working directory to the `app` directory -WORKDIR /app - -# Install dependencies -RUN --mount=type=cache,target=/root/.cache/uv \ - --mount=type=bind,source=pyproject.toml,target=pyproject.toml \ - uv sync --no-install-project - -# Copy the application file -COPY main.py /app/ - -# Set the environment variables -ENV PYTHONUNBUFFERED=1 -ENV PYTHONDONTWRITEBYTECODE=1 - -# Run the application -CMD ["uv", "run", "main.py"] diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index e8cdcd5..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,9 +0,0 @@ -services: - anewdawn: - image: ghcr.io/thelovinator1/anewdawn:latest - container_name: anewdawn - env_file: .env - environment: - - DISCORD_TOKEN=${DISCORD_TOKEN} - - OPENAI_TOKEN=${OPENAI_TOKEN} - restart: unless-stopped