diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7a0cb98..f974267 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -14,6 +14,7 @@ jobs: matrix: features: - texlive + - texlive-base baseImage: - debian:latest - ubuntu:latest @@ -34,6 +35,7 @@ jobs: matrix: features: - texlive + - texlive-base steps: - uses: actions/checkout@v3 diff --git a/src/texlive-base/README.md b/src/texlive-base/README.md new file mode 100644 index 0000000..7c609fd --- /dev/null +++ b/src/texlive-base/README.md @@ -0,0 +1,25 @@ + +# Texlive + +Installs a texlive environment + +## Example Usage + +```json +"features": { + "ghcr.io/daniel-eder/devcontainers-feature-texlive/texlive:1": { + "version": "latest" + } +} +``` + +## Options + +| Options Id | Description | Type | Default Value | +|-----|-----|-----|-----| + + + +--- + +_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/devcontainers/feature-starter/blob/main/src/hello/devcontainer-feature.json). Add additional notes to a `NOTES.md`._ diff --git a/src/texlive-base/devcontainer-feature.json b/src/texlive-base/devcontainer-feature.json new file mode 100644 index 0000000..72e5d6b --- /dev/null +++ b/src/texlive-base/devcontainer-feature.json @@ -0,0 +1,11 @@ +{ + "name": "TexLive Base", + "id": "texlive-base", + "version": "1.0.0", + "description": "A feature providing a minimal texlive environment.", + "options": { + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils" + ] +} diff --git a/src/texlive-base/install.sh b/src/texlive-base/install.sh new file mode 100644 index 0000000..d26233b --- /dev/null +++ b/src/texlive-base/install.sh @@ -0,0 +1,14 @@ +#!/bin/sh +set -e + +# Clean up +rm -rf /var/lib/apt/lists/* + +# Install +apt-get -y update +apt-get -y install texlive-base + +# Clean up +rm -rf /var/lib/apt/lists/* + +echo "Done!" \ No newline at end of file diff --git a/test/texlive-base/scenarios.json b/test/texlive-base/scenarios.json new file mode 100644 index 0000000..9478f5d --- /dev/null +++ b/test/texlive-base/scenarios.json @@ -0,0 +1,9 @@ +{ + "texlive-base": { + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "features": { + "texlive-base": { + } + } + } +} diff --git a/test/texlive-base/test.sh b/test/texlive-base/test.sh new file mode 100644 index 0000000..f167bd6 --- /dev/null +++ b/test/texlive-base/test.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +# This test file will be executed against an auto-generated devcontainer.json that +# includes the 'hello' Feature with no options. +# +# For more information, see: https://github.com/devcontainers/cli/blob/main/docs/features/test.md +# +# Eg: +# { +# "image": "<..some-base-image...>", +# "features": { +# "hello": {} +# }, +# "remoteUser": "root" +# } +# +# Thus, the value of all options will fall back to the default value in +# the Feature's 'devcontainer-feature.json'. +# For the 'hello' feature, that means the default favorite greeting is 'hey'. +# +# These scripts are run as 'root' by default. Although that can be changed +# with the '--remote-user' flag. +# +# This test can be run with the following command: +# +# devcontainer features test \ +# --features hello \ +# --remote-user root \ +# --skip-scenarios \ +# --base-image mcr.microsoft.com/devcontainers/base:ubuntu \ +# /path/to/this/repo + +set -e + +# This test file will be executed against one of the scenarios devcontainer.json test that +set -e + +# Optional: Import test library bundled with the devcontainer CLI +# See https://github.com/devcontainers/cli/blob/HEAD/docs/features/test.md#dev-container-features-test-lib +# Provides the 'check' and 'reportResults' commands. +source dev-container-features-test-lib + +# Feature-specific tests +# The 'check' command comes from the dev-container-features-test-lib. +check "execute command" bash -c "latex small2e" + +# Report results +# If any of the checks above exited with a non-zero exit code, the test will fail. +reportResults \ No newline at end of file diff --git a/test/texlive-base/texlive.sh b/test/texlive-base/texlive.sh new file mode 100644 index 0000000..df04309 --- /dev/null +++ b/test/texlive-base/texlive.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# This test file will be executed against one of the scenarios devcontainer.json test that +set -e + +# Optional: Import test library bundled with the devcontainer CLI +# See https://github.com/devcontainers/cli/blob/HEAD/docs/features/test.md#dev-container-features-test-lib +# Provides the 'check' and 'reportResults' commands. +source dev-container-features-test-lib + +# Feature-specific tests +# The 'check' command comes from the dev-container-features-test-lib. +check "execute command" bash -c "latex small2e" + +# Report results +# If any of the checks above exited with a non-zero exit code, the test will fail. +reportResults