Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
80c638b
Refactor email field in CV files and enhance style setup for better i…
kadykov Apr 23, 2025
ff8a8df
Add build script and update entrypoint in Dockerfile
kadykov Apr 23, 2025
af4af57
Refactor project structure: replace `justfile` with `build.sh`, updat…
kadykov Apr 23, 2025
fe21540
Remove deprecated files: delete action.yml, entrypoint.sh, and justfile
kadykov Apr 23, 2025
d19b861
Enhance devcontainer configuration: add volume mount for vscode home …
kadykov Apr 23, 2025
9594105
Refactor email handling: replace `public-email` with `email` in CV an…
kadykov Apr 24, 2025
8dd5366
Refactor date handling: replace direct date usage with constructed da…
kadykov Apr 26, 2025
742596c
Revert output format changes: restore output_format handling and upda…
kadykov Apr 26, 2025
ed779c6
Add Bats tests for build.sh functionality and submodule configuration
kadykov Apr 26, 2025
d323049
Add tests and example files for Typst CV and linkify filters
kadykov Apr 26, 2025
9079fe2
Add E2E smoke test script for PDF generation using build.sh
kadykov Apr 26, 2025
e2aeaf8
Refactor CI workflow: update artifact handling, remove publish job, a…
kadykov Apr 26, 2025
6c9a080
Add Justfile for common development tasks and testing automation
kadykov Apr 26, 2025
9234cfc
Enhance README: clarify priority of overrides and recommended workflo…
kadykov Apr 26, 2025
0ee0e19
Update activeContext, progress, and techContext documentation: reflec…
kadykov Apr 26, 2025
54e160c
Delete outdated CV and cover letter files in French and English.
kadykov Apr 26, 2025
9436956
Refactor devcontainer configuration: remove unnecessary user settings…
kadykov Apr 26, 2025
f99e880
Refactor style references: update function calls to use the 'style' p…
kadykov Apr 26, 2025
5331e5c
Enhance Dockerfile and tests: add poppler-utils for PDF content check…
kadykov Apr 26, 2025
ac43918
Add poppler-utils to Dockerfile for PDF processing in E2E tests
kadykov Apr 26, 2025
0275a44
Update pre-commit hooks and enhance shellcheck directives in build an…
kadykov Apr 26, 2025
2323268
Remove unnecessary script execution step in CI workflow for cleaner t…
kadykov Apr 26, 2025
15897ed
Add code checkout step before running tests in CI workflow
kadykov Apr 26, 2025
894a2f0
Add section separators in example CV for improved readability
kadykov Apr 27, 2025
3f45db2
Add Dockerfile for font installation and update devcontainer configur…
kadykov Apr 27, 2025
30f7b3e
Enhance Dockerfile and Typst templates for improved development setup
kadykov Apr 28, 2025
d05f3df
Add Ubuntu-based Dockerfile and update devcontainer configuration for…
kadykov Apr 29, 2025
1f19861
Add 'file' package to Dockerfile for improved dependency management
kadykov Apr 29, 2025
6f08942
Refactor Dockerfile to improve font installation and Typst setup, str…
kadykov Apr 29, 2025
f5e2db9
Enhance build.sh to handle stdin input, enforce single input file res…
kadykov Apr 29, 2025
fdd606a
Add Bats tests for Docker image and update CV templates for consistency
kadykov Apr 29, 2025
3ef3237
Enhance Header function to prioritize 'photo' attribute handling and …
kadykov Apr 29, 2025
515087d
Add Docker usage tests to the Justfile and update test task to includ…
kadykov Apr 29, 2025
9263bd6
Enhance CI workflow to include Docker usage tests and adjust test exe…
kadykov Apr 29, 2025
e636f62
Refactor Docker setup and testing framework: switch to Ubuntu-based d…
kadykov Apr 29, 2025
a1d3769
Refactor Docker build tasks: remove Fedora image build and update com…
kadykov Apr 29, 2025
0918f1d
Refactor CI workflow and Justfile: update Docker testing steps, enhan…
kadykov Apr 29, 2025
1b87fa1
Fix CI workflow to execute internal tests in devcontainer and Docker …
kadykov Apr 29, 2025
29e7eea
Add diagnostic step to verify submodule checkout in CI workflow
kadykov Apr 29, 2025
0e50e5f
Fix CI workflow to ensure submodules are initialized and updated, and…
kadykov Apr 29, 2025
07ef11d
Enhance CI workflow: add verification step for submodule checkout and…
kadykov Apr 29, 2025
2eb782e
Update submodule URLs to use SSH and add submodule commits for bats a…
kadykov Apr 30, 2025
6587839
Refactor Bats integration: remove submodule references and update to …
kadykov Apr 30, 2025
0780bf0
Add .dockerignore file to exclude unnecessary files from Docker image
kadykov Apr 30, 2025
36c0c2d
Remove submodule initialization and verification steps from CI workfl…
kadykov Apr 30, 2025
2f4088c
Clarify comment regarding build.sh permissions in Bats test
kadykov Apr 30, 2025
9ea23fd
Refactor Typst package setup: move symlink creation from Dockerfile t…
kadykov Apr 30, 2025
b430cbd
Update CI workflow to install Bats helpers and modify active context …
kadykov Apr 30, 2025
3dc3982
Fix PDF write permission error in Bats tests by directing output to a…
kadykov Apr 30, 2025
7dd3699
Setup Pandoc symlinks in Dockerfile and update build.sh to use relati…
kadykov Apr 30, 2025
f789c39
Refactor E2E tests: replace shell script with Bats tests for PDF gene…
kadykov Apr 30, 2025
f142119
Update activeContext and progress documentation to reflect CI test re…
kadykov Apr 30, 2025
56f9ad3
Fix CI Docker tests by parameterizing image tag and updating workflow
kadykov Apr 30, 2025
dc0d968
Fix CI workflow for building example PDFs by correcting entrypoint ar…
kadykov Apr 30, 2025
b731a91
Enhance CI workflow: add devcontainer caching to GHCR, implement cond…
kadykov Apr 30, 2025
c1baee8
Add PR event trigger to Devcontainer image caching job
kadykov Apr 30, 2025
141950b
Ensure lowercase repository name in Devcontainer image name
kadykov Apr 30, 2025
98a9439
Add permissions for Docker job to enable GHCR package push
kadykov May 1, 2025
980e030
Remove redundant source job and docker pull step from CI workflow
kadykov May 1, 2025
3e48504
Fix devcontainer image tagging for PR builds by ensuring the :latest …
kadykov May 1, 2025
7dc1a5a
Refactor devcontainer image caching to use dedicated ':buildcache' ta…
kadykov May 1, 2025
5a5eabf
Add CI/CD enhancements: integrate CodeQL analysis, Docker image scann…
kadykov May 1, 2025
0108d13
Remove CodeQL analysis workflow due to unsupported languages and errors
kadykov May 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# === BUILDER STAGE: Install fonts with fontist ===
FROM ruby:slim AS fonts-builder

RUN apt-get update && apt-get install -y --no-install-recommends \
git \
build-essential \
&& rm -rf /var/lib/apt/lists/*

# Install fontist and required fonts
RUN gem install fontist --no-document

COPY fontist-manifest.yml .

RUN fontist update --quiet \
&& fontist manifest-install --quiet fontist-manifest.yml \
&& fontist cache clear --quiet \
&& chmod -R 644 /root/.fontist/fonts

# === FINAL STAGE: Alpine with copied fonts ===
FROM alpine:3.21

RUN apk add --no-cache \
bash \
git \
pandoc \
typst \
shellcheck \
just \
poppler-utils \
python3 \
uv \
pre-commit \
nodejs \
npm \
fontconfig \
font-awesome \
font-awesome-free \
font-awesome-brands \
&& rm -rf /var/cache/apk/*

# Copy all fonts from the builder stage at once
COPY --from=fonts-builder /root/.fontist/fonts/ /usr/share/fonts/fontist/

ENV TYPST_FONT_PATHS=/usr/share/fonts

# Update font cache
RUN fc-cache -fv

# --- Setup Local Typst Package Symlink for Development ---
# Define the target package path using the standard ENV var name
ENV TYPST_PACKAGE_PATH=/usr/local/share/typst/packages
ENV DEV_PKG_DIR=$TYPST_PACKAGE_PATH/local/pandoc-cv/0.1.0
# Create the directory structure
RUN mkdir -p $DEV_PKG_DIR
# Create symlinks from the workspace files to the package directory
# This assumes the devcontainer mounts the workspace at /workspaces/typstCV
# Use ln -sf to force link creation/overwrite if it exists
RUN ln -sf /workspaces/typstCV/style.typ $DEV_PKG_DIR/style.typ \
&& ln -sf /workspaces/typstCV/typst.toml $DEV_PKG_DIR/typst.toml
103 changes: 103 additions & 0 deletions .devcontainer/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Use a Microsoft base image with common dev tools pre-installed
FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04

# Install system dependencies using apt-get
# Need: git, pandoc, typst (manual?), shellcheck, just (manual?), poppler-utils,
# python3, pipx (for uv, pre-commit), nodejs, npm, fontconfig, ruby, build-essential (for fontist)
USER root

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get install -y --no-install-recommends \
git \
file \
pandoc \
shellcheck \
poppler-utils \
python3 \
python3-pip \
pipx \
pre-commit \
nodejs \
npm \
fontconfig \
ruby \
ruby-dev \
build-essential \
wget \
ca-certificates \
unzip \
just \
bats \
bats-assert \
bats-support \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Just is installed via apt-get above

# --- Install Font Awesome 6 ---
RUN export FA_VERSION=6.7.2 \
&& export FA_DIR=/usr/local/share/fonts/fontawesome6 \
&& mkdir -p ${FA_DIR} \
&& wget -qO /tmp/fontawesome.zip https://github.com/FortAwesome/Font-Awesome/releases/download/${FA_VERSION}/fontawesome-free-${FA_VERSION}-desktop.zip \
&& unzip -q /tmp/fontawesome.zip -d /tmp/fontawesome-extract 'fontawesome-free-*-desktop/otfs/*' \
&& mv /tmp/fontawesome-extract/fontawesome-free-*-desktop/otfs/*.otf ${FA_DIR}/ \
&& fc-cache -f -v \
&& rm -rf /tmp/fontawesome.zip /tmp/fontawesome-extract

# Install Typst manually (using musl build might work, or check for glibc build)
# Let's try the musl build first as it's known
ARG TYPST_VERSION=v0.12.0
ARG TARGET=x86_64-unknown-linux-musl
RUN wget -qO typst.tar.xz https://github.com/typst/typst/releases/download/${TYPST_VERSION}/typst-${TARGET}.tar.xz \
&& tar xf typst.tar.xz \
&& mv typst-${TARGET}/typst /usr/local/bin/typst \
&& chmod +x /usr/local/bin/typst \
&& rm -rf typst.tar.xz typst-${TARGET} \
&& typst --version

# Install fontist
RUN gem install fontist --no-document --version "~> 1.21.1"

# --- Setup Pandoc Symlinks for Development/Testing ---
# Create standard pandoc directories and symlink workspace files into them
# This makes the devcontainer environment match the production container's setup
# where these files are copied into standard locations.
# Needs to run as root before switching to vscode user.
ENV PANDOC_DATA_DIR=/usr/share/pandoc
RUN mkdir -p $PANDOC_DATA_DIR/filters && \
mkdir -p $PANDOC_DATA_DIR/templates && \
ln -sf /workspaces/typstCV/linkify.lua $PANDOC_DATA_DIR/filters/linkify.lua && \
ln -sf /workspaces/typstCV/typst-cv.lua $PANDOC_DATA_DIR/filters/typst-cv.lua && \
ln -sf /workspaces/typstCV/typst-cv.typ $PANDOC_DATA_DIR/templates/typst-cv.typ && \
ln -sf /workspaces/typstCV/typst-letter.typ $PANDOC_DATA_DIR/templates/typst-letter.typ

# Switch back to vscode user provided by base image
USER vscode

# --- Setup Local Typst Package Symlink for Development/Testing ---
# Define the target package path using the standard ENV var name
# Use the user's local share directory now
ENV TYPST_PACKAGE_PATH=/home/vscode/.local/share/typst/packages
ENV DEV_PKG_DIR=$TYPST_PACKAGE_PATH/local/pandoc-cv/0.1.0
# Create the directory structure and symlinks during build
# These point to the workspace location, which will be mounted at runtime
RUN mkdir -p $DEV_PKG_DIR && \
ln -sf /workspaces/typstCV/style.typ $DEV_PKG_DIR/style.typ && \
ln -sf /workspaces/typstCV/typst.toml $DEV_PKG_DIR/typst.toml

# Install fonts using fontist (run as vscode user)
COPY --chown=vscode:vscode fontist-manifest.yml /tmp/fontist-manifest.yml
RUN fontist update --quiet \
&& fontist manifest-install --quiet /tmp/fontist-manifest.yml \
&& fontist cache clear --quiet \
&& rm /tmp/fontist-manifest.yml \
&& sudo fc-cache -fv # Update system font cache

# Set Font Path (includes fontist user dir and system FA6 dir)
ENV TYPST_FONT_PATHS=/home/vscode/.fontist/fonts:/usr/local/share/fonts/fontawesome6

# Ensure pipx path is in PATH
ENV PATH="/home/vscode/.local/bin:${PATH}"

RUN mkdir -p /home/vscode/.vscode-server/data/User/globalStorage
36 changes: 23 additions & 13 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
{
"name": "typst",
"name": "${localWorkspaceFolderBasename}-devcontainer-ubuntu",
"build": {
"dockerfile": "../Dockerfile"
"dockerfile": "./Dockerfile.ubuntu",
"context": ".."
},
"runArgs": [
"--env-file",
".devcontainer/devcontainer.env"
],
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "true",
"username": "vscode",
"userUid": "1000",
"userGid": "1000",
"upgradePackages": "true"
"username": "vscode"
},
"ghcr.io/kadykov/devcontainer-features/pre-commit:1": {},
"ghcr.io/lukewiwa/features/shellcheck:0": {}
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"version": "latest",
"moby": true
}
},
"postCreateCommand": "pre-commit install",
"remoteUser": "vscode",
Expand All @@ -22,12 +25,19 @@
"ms-azuretools.vscode-docker",
"myriad-dreamin.tinymist",
"skellock.just",
"ritwickdey.LiveServer",
"GitHub.vscode-github-actions",
"eamodio.gitlens",
"sumneko.lua",
"yinfei.luahelper"
"yinfei.luahelper",
"saoudrizwan.claude-dev",
"jetmartin.bats"
]
}
}
},
"mounts": [
{
"source": "${localWorkspaceFolderBasename}-vscode-global-storage",
"target": "/home/vscode/.vscode-server/data/User/globalStorage",
"type": "volume"
}
]
}
31 changes: 31 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Git related
.git
.gitignore
.gitmodules

# Development and CI/CD
.devcontainer
.github
.vscode
.pre-commit-config.yaml
.yamlfmt.yml
justfile

# Tests (not needed in production image)
tests/

# Examples (built separately if needed, not part of base image)
examples/

# Documentation / Metadata
CHANGELOG.md
README.md
LICENSE
memory-bank/

# Temporary / Output files
*.pdf
temp.*

# Environment files (keep example)
.env
34 changes: 34 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
# Basic Dependabot configuration file

version: 2
updates:
# Maintain dependencies for Docker
- package-ecosystem: "docker"
directory: "/" # Location of Dockerfile
schedule:
interval: "weekly"
day: "sunday" # Check on Sundays
# Add reviewers, assignees, labels as needed
# reviewers:
# - "octocat"
# assignees:
# - "octocat"
# labels:
# - "dependencies"
# - "docker"

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/" # Location of workflow files
schedule:
interval: "weekly"
day: "sunday" # Check on Sundays
# Add reviewers, assignees, labels as needed
# reviewers:
# - "octocat"
# assignees:
# - "octocat"
# labels:
# - "dependencies"
# - "github_actions"
Loading