Skip to content

Commit

Permalink
fix (build): Adding missing test coverage for devcontainer.json (see #…
Browse files Browse the repository at this point in the history
  • Loading branch information
vorburger committed Feb 5, 2025
1 parent fe95192 commit a7693e8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,25 @@ concurrency:
cancel-in-progress: true

jobs:
devcontainer:
# https://github.com/orgs/community/discussions/25722
if:
(github.repository == 'enola-dev/enola') &&
(github.event.pull_request.draft == false)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: DevContainer
# TODO if: ${{ github.event_name == 'push' }}
uses: devcontainers/[email protected]
with:
# TODO imageName: ghcr.io/example/example-devcontainer
# TODO cacheFrom: ghcr.io/example/example-devcontainer
# TODO push: always
push: never
runCmd: echo DevContainer OK!
# TODO runCmd: ./tools/test-ci/test.bash

build:
# https://github.com/orgs/community/discussions/25722
if:
Expand Down Expand Up @@ -150,6 +169,7 @@ jobs:
if: ${{ github.event_name == 'push' }}
run: ./tools/docs/build.bash

# TODO Move *BEFORE* ./tools/test-ci/test.bash, so that "dirty" changes cause build to abort
- name: pre-commit run --all-files
run: .venv/bin/pre-commit run --all-files

Expand Down
4 changes: 3 additions & 1 deletion tools/asdf/install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ set -euo pipefail
# let's wipe everything, and (re)install only the one we want below
# (via ASDF, for consistency), to avoid confusion:
# TODO Remove this when .devcontainer/devcontainer.json switched to a lighter base image
rm -rf /usr/local/sdkman/candidates/java/
if [[ -n "${REMOTE_CONTAINERS:-}" ]]; then
sudo rm -rf /usr/local/sdkman/candidates/java/
fi

if ! [ -x "$(command -v asdf)" ]; then
if ! [ -d "$HOME/.asdf/" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tools/devcontainer/install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -euo pipefail
set -euox pipefail

# This script prepares the Dev Container used for GitHub CodeSpaces.
# Because this is invoked as an onCreateCommand in the .devcontainer/devcontainer.json,
Expand Down

0 comments on commit a7693e8

Please sign in to comment.