Update debugging step in CI workflow to list all files with human-readable sizes
All checks were successful
CI / ci (push) Successful in 6s

This commit is contained in:
Joakim Hellsén 2026-03-17 20:56:50 +01:00
commit dd2805b7f0
Signed by: Joakim Hellsén
SSH key fingerprint: SHA256:/9h/CsExpFp+PRhsfA0xznFx2CGfTT5R/kpuFfUgEQk
4 changed files with 12 additions and 39 deletions

View file

@ -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

View file

@ -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

View file

@ -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"]

View file

@ -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