From 761875a400105acaab8131da7ec4e7277f3312c5 Mon Sep 17 00:00:00 2001 From: Ben Spoor <37540691+ben-edna@users.noreply.github.com> Date: Fri, 20 Jun 2025 08:04:27 +0200 Subject: [PATCH 1/3] Update Dockerfile Deps in devcontainer were broken --- .devcontainer/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From 1af274f42152ff2b80e61b72ef63f370edad9ea4 Mon Sep 17 00:00:00 2001 From: Ben Spoor <37540691+ben-edna@users.noreply.github.com> Date: Fri, 20 Jun 2025 08:13:20 +0200 Subject: [PATCH 2/3] Create devcontainer.yml --- .github/workflows/devcontainer.yml | 50 ++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/devcontainer.yml diff --git a/.github/workflows/devcontainer.yml b/.github/workflows/devcontainer.yml new file mode 100644 index 00000000..8e30d845 --- /dev/null +++ b/.github/workflows/devcontainer.yml @@ -0,0 +1,50 @@ +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: + imageName: ghcr.io/${{ github.repository }}/devcontainer + cacheFrom: ghcr.io/${{ github.repository }}/devcontainer + push: false + 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 "Running feature tests..." + python -m behave features + + echo "Building documentation..." + make -C doc html + make -C doc/landing-page html From 56a33c32c70a48758341a62bfcc2335773afa14e Mon Sep 17 00:00:00 2001 From: Ben Spoor <37540691+ben-edna@users.noreply.github.com> Date: Fri, 20 Jun 2025 08:21:16 +0200 Subject: [PATCH 3/3] Remove feature tests in devcontainer test --- .github/workflows/devcontainer.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/devcontainer.yml b/.github/workflows/devcontainer.yml index 8e30d845..bdc8a31c 100644 --- a/.github/workflows/devcontainer.yml +++ b/.github/workflows/devcontainer.yml @@ -29,9 +29,6 @@ jobs: - name: Build DevContainer image uses: devcontainers/ci@v0.3 with: - imageName: ghcr.io/${{ github.repository }}/devcontainer - cacheFrom: ghcr.io/${{ github.repository }}/devcontainer - push: false runCmd: | echo "Installing test dependencies..." pip install -e .[development,docs,casts] @@ -42,9 +39,6 @@ jobs: echo "Running unit tests..." python -m pytest tests - echo "Running feature tests..." - python -m behave features - echo "Building documentation..." make -C doc html make -C doc/landing-page html