Skip to content

Commit

Permalink
feat: add texlive-latex-recommended
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-eder committed Nov 8, 2023
1 parent 202f6be commit 3a722bc
Show file tree
Hide file tree
Showing 7 changed files with 126 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
features:
- texlive
- texlive-base
- texlive-latex-recommended
baseImage:
- debian:latest
- ubuntu:latest
Expand All @@ -36,6 +37,7 @@ jobs:
features:
- texlive
- texlive-base
- texlive-latex-recommended
steps:
- uses: actions/checkout@v3

Expand Down
24 changes: 24 additions & 0 deletions src/texlive-latex-recommended/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

# TexLive Base (texlive-base)

A feature providing a minimal texlive environment.

## Example Usage

```json
"features": {
"ghcr.io/daniel-eder/devcontainers-feature-texlive/texlive-base:1": {}
}
```

## Options

| Options Id | Description | Type | Default Value |
|-----|-----|-----|-----|




---

_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/daniel-eder/devcontainers-feature-texlive/blob/main/src/texlive-base/devcontainer-feature.json). Add additional notes to a `NOTES.md`._
11 changes: 11 additions & 0 deletions src/texlive-latex-recommended/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "TexLive Latex Recommended",
"id": "texlive-latex-recommended",
"version": "1.0.0",
"description": "A feature providing the recommended latex texlive environment.",
"options": {
},
"installsAfter": [
"ghcr.io/devcontainers/features/common-utils"
]
}
14 changes: 14 additions & 0 deletions src/texlive-latex-recommended/install.sh
Original file line number Diff line number Diff line change
@@ -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-latex-recommended

# Clean up
rm -rf /var/lib/apt/lists/*

echo "Done!"
9 changes: 9 additions & 0 deletions test/texlive-latex-recommended/scenarios.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"texlive-latex-recommended": {
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"texlive-latex-recommended": {
}
}
}
}
49 changes: 49 additions & 0 deletions test/texlive-latex-recommended/test.sh
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions test/texlive-latex-recommended/texlive-latex-recommended.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3a722bc

Please sign in to comment.