Skip to content

Commit

Permalink
feat: add texlive base
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-eder committed Nov 8, 2023
1 parent bd66ef5 commit b958c8a
Show file tree
Hide file tree
Showing 7 changed files with 127 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 @@ -14,6 +14,7 @@ jobs:
matrix:
features:
- texlive
- texlive-base
baseImage:
- debian:latest
- ubuntu:latest
Expand All @@ -34,6 +35,7 @@ jobs:
matrix:
features:
- texlive
- texlive-base
steps:
- uses: actions/checkout@v3

Expand Down
25 changes: 25 additions & 0 deletions src/texlive-base/README.md
Original file line number Diff line number Diff line change
@@ -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`._
11 changes: 11 additions & 0 deletions src/texlive-base/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
14 changes: 14 additions & 0 deletions src/texlive-base/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-base

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

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

Please sign in to comment.