diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index b3e86530..00c776e0 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -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 @@ -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 diff --git a/.github/workflows/devcontainer.yml b/.github/workflows/devcontainer.yml new file mode 100644 index 00000000..bdc8a31c --- /dev/null +++ b/.github/workflows/devcontainer.yml @@ -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