Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM mcr.microsoft.com/devcontainers/python:1-3.12-bullseye
# pv is required for asciicasts
RUN apt-get update && apt-get install --no-install-recommends -y \
pv=1.6.6-1+b1 \
subversion=1.14.1-3+deb11u1 && \
subversion=1.14.1-3+deb11u2 && \
rm -rf /var/lib/apt/lists/*

WORKDIR /workspaces/dfetch
Expand All @@ -20,7 +20,7 @@ ENV PYTHONUSERBASE="/home/dev/.local"

COPY --chown=dev:dev . .

RUN pip install --no-cache-dir --root-user-action=ignore --upgrade pip==25.0.1 \
RUN pip install --no-cache-dir --root-user-action=ignore --upgrade pip==25.1.1 \
&& pip install --no-cache-dir --root-user-action=ignore -e .[development,docs,test,casts] \
&& pre-commit install --install-hooks

Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: DevContainer

on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]

jobs:
devcontainer:
name: DevContainer Build & Test
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: devcontainer-${{ runner.os }}-${{ github.sha }}
restore-keys: |
devcontainer-${{ runner.os }}-

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build DevContainer image
uses: devcontainers/ci@v0.3
with:
runCmd: |
echo "Installing test dependencies..."
pip install -e .[development,docs,casts]

echo "Running pre-commit checks..."
pre-commit run --all-files

echo "Running unit tests..."
python -m pytest tests

echo "Building documentation..."
make -C doc html
make -C doc/landing-page html
Loading