Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .copier-answers.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 0.10.0
_commit: 0.11.0
_src_path: gh:quickplates/meta
accountname: quickplates
description: Helm charts template ⛵
Expand Down
333 changes: 102 additions & 231 deletions .devcontainer/devcontainer.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .devcontainer/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# It also has git, zsh and a bunch of other stuff preinstalled
# Also, it includes a non-root 'vscode' user with sudo access
# The version is pinned to ensure reproducibility
FROM mcr.microsoft.com/devcontainers/base:1.2.3-ubuntu-24.04
FROM mcr.microsoft.com/devcontainers/base:1.2.6-ubuntu-24.04

ENV REMOTE_USER=vscode

Expand Down
13 changes: 13 additions & 0 deletions .devcontainer/image/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,16 @@ EOF
cat <<EOF >>"${REMOTE_USER_HOME}/.zshrc"
export TRUNK_CACHE=/cache/trunk/
EOF

# Setup npm cache
mkdir --parents /cache/npm/

chown --recursive "${REMOTE_USER}:" /cache/npm/

cat <<EOF >>"${REMOTE_USER_HOME}/.bashrc"
export NPM_CONFIG_CACHE=/cache/npm/
EOF

cat <<EOF >>"${REMOTE_USER_HOME}/.zshrc"
export NPM_CONFIG_CACHE=/cache/npm/
EOF
44 changes: 22 additions & 22 deletions .github/workflows/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,27 @@ jobs:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
uses: actions/checkout@v5.0.0
- name: Setup Nix cache
uses: actions/cache@v4.2.1
uses: actions/cache@v4.3.0
id: cache-nix
with:
path: ${{ env.NIX_CACHE_DIR }}
key: example-nix
- name: Install Nix
uses: cachix/install-nix-action@v30
uses: cachix/install-nix-action@v31.8.4
with:
github_access_token: ${{ github.token }}
install_url: https://releases.nixos.org/nix/nix-2.26.2/install
install_url: https://releases.nixos.org/nix/nix-2.28.5/install
# See: https://github.com/cachix/install-nix-action/issues/56
- name: Import Nix store cache
if: steps.cache-nix.outputs.cache-hit == 'true'
run: >
run: >-
nix-store
--import
< ${{ env.NIX_CACHE_DIR }}/archive.nar
- name: Build template files
run: >
run: >-
nix
develop
./#template
Expand All @@ -76,7 +76,7 @@ jobs:
'description=Helm charts example ⛵'
# Create archive to retain file permissions
- name: Create archive
run: >
run: >-
tar
--directory
build/
Expand All @@ -86,15 +86,15 @@ jobs:
archive.tar
./
- name: Upload artifact
uses: actions/upload-artifact@v4.6.0
uses: actions/upload-artifact@v5.0.0
with:
include-hidden-files: true
name: build
path: archive.tar
# See: https://github.com/cachix/install-nix-action/issues/56
- name: Export Nix store cache
if: "!cancelled()"
run: >
run: >-
mkdir
--parents
${{ env.NIX_CACHE_DIR }}
Expand All @@ -112,11 +112,11 @@ jobs:
timeout-minutes: 10
steps:
- name: Download artifact
uses: actions/download-artifact@v4.1.8
uses: actions/download-artifact@v6.0.0
with:
name: build
- name: Extract archive
run: >
run: >-
mkdir
--parents
build/
Expand All @@ -129,7 +129,7 @@ jobs:
--file
archive.tar
- name: Checkout example repository
uses: actions/checkout@v4.2.2
uses: actions/checkout@v5.0.0
with:
repository: quickplates/helm-example
token: ${{ secrets.EXAMPLES_ACCESS_TOKEN }}
Expand All @@ -139,7 +139,7 @@ jobs:
# Configure git to use GitHub Actions bot as committer
- name: Configure git
working-directory: example/
run: >
run: >-
git
config
user.name
Expand All @@ -151,48 +151,48 @@ jobs:
"41898282+github-actions[bot]@users.noreply.github.com"
- name: Reset example repository to first commit
working-directory: example/
run: >
run: >-
git
reset
--hard
"$(git rev-list --max-parents=0 HEAD)"
- name: Push changes
working-directory: example/
run: >
run: >-
git
push
--force
origin
HEAD
- name: Create new branch
working-directory: example/
run: >
run: >-
git
checkout
-b
build
- name: Copy build output
run: >
run: >-
cp
--recursive
build/.
example/
- name: Add changes
working-directory: example/
run: >
run: >-
git
add
./
- name: Commit changes
working-directory: example/
run: >
run: >-
git
commit
--message
'Added template files'
- name: Push changes
working-directory: example/
run: >
run: >-
git
push
--force
Expand All @@ -202,7 +202,7 @@ jobs:
working-directory: example/
env:
GITHUB_TOKEN: ${{ secrets.EXAMPLES_ACCESS_TOKEN }}
run: >
run: >-
gh
pr
create
Expand All @@ -224,7 +224,7 @@ jobs:
working-directory: example/
env:
GITHUB_TOKEN: ${{ secrets.EXAMPLES_ACCESS_TOKEN }}
run: >
run: >-
gh
pr
merge
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,35 +28,35 @@ jobs:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
uses: actions/checkout@v5.0.0
# We need to fetch upstream so Trunk can compare against it
- name: Fetch upstream
if: github.event_name == 'pull_request'
run: >
run: >-
git
fetch
origin
${{ github.event.pull_request.base.ref }}
- name: Setup Nix cache
uses: actions/cache@v4.2.1
uses: actions/cache@v4.3.0
id: cache-nix
with:
path: ${{ env.NIX_CACHE_DIR }}
key: lint-nix
- name: Setup Trunk cache
uses: actions/cache@v4.2.1
uses: actions/cache@v4.3.0
with:
path: ${{ env.TRUNK_CACHE_DIR }}
key: lint-trunk
- name: Install Nix
uses: cachix/install-nix-action@v30
uses: cachix/install-nix-action@v31.8.4
with:
github_access_token: ${{ github.token }}
install_url: https://releases.nixos.org/nix/nix-2.26.2/install
install_url: https://releases.nixos.org/nix/nix-2.28.5/install
# See: https://github.com/cachix/install-nix-action/issues/56
- name: Import Nix store cache
if: steps.cache-nix.outputs.cache-hit == 'true'
run: >
run: >-
nix-store
--import
< ${{ env.NIX_CACHE_DIR }}/archive.nar
Expand All @@ -65,7 +65,7 @@ jobs:
if: github.event_name == 'pull_request'
env:
TRUNK_CACHE: ${{ env.TRUNK_CACHE_DIR }}
run: >
run: >-
nix
develop
./#lint
Expand All @@ -82,7 +82,7 @@ jobs:
if: github.event_name != 'pull_request'
env:
TRUNK_CACHE: ${{ env.TRUNK_CACHE_DIR }}
run: >
run: >-
nix
develop
./#lint
Expand All @@ -95,7 +95,7 @@ jobs:
# See: https://github.com/cachix/install-nix-action/issues/56
- name: Export Nix store cache
if: "!cancelled()"
run: >
run: >-
mkdir
--parents
${{ env.NIX_CACHE_DIR }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,34 +46,34 @@ jobs:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
uses: actions/checkout@v5.0.0
- name: Setup Nix cache
uses: actions/cache@v4.2.1
uses: actions/cache@v4.3.0
id: cache-nix
with:
path: ${{ env.NIX_CACHE_DIR }}
key: test-nix
- name: Setup Trunk cache
uses: actions/cache@v4.2.1
uses: actions/cache@v4.3.0
with:
path: ${{ env.TRUNK_CACHE_DIR }}
key: test-trunk
- name: Install Nix
uses: cachix/install-nix-action@v30
uses: cachix/install-nix-action@v31.8.4
with:
github_access_token: ${{ github.token }}
install_url: https://releases.nixos.org/nix/nix-2.26.2/install
install_url: https://releases.nixos.org/nix/nix-2.28.5/install
# See: https://github.com/cachix/install-nix-action/issues/56
- name: Import Nix store cache
if: steps.cache-nix.outputs.cache-hit == 'true'
run: >
run: >-
nix-store
--import
< ${{ env.NIX_CACHE_DIR }}/archive.nar
- name: Run tests
env:
TRUNK_CACHE: ${{ env.TRUNK_CACHE_DIR }}
run: >
run: >-
nix
develop
./#test
Expand All @@ -84,7 +84,7 @@ jobs:
# See: https://github.com/cachix/install-nix-action/issues/56
- name: Export Nix store cache
if: "!cancelled()"
run: >
run: >-
mkdir
--parents
${{ env.NIX_CACHE_DIR }}
Expand Down
3 changes: 3 additions & 0 deletions .trunk/configs/.markdownlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ MD033: false

# Allow not using top level header
MD041: false

# Allow non-descriptive link text
MD059: false
6 changes: 6 additions & 0 deletions .trunk/configs/.prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
plugins:
# Enable JSON sorting plugin
- prettier-plugin-sort-json

# Sort JSON recursively
jsonRecursiveSort: true
49 changes: 26 additions & 23 deletions .trunk/configs/ruff.toml
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
# Generic, formatter-friendly config.
# See https://beta.ruff.rs/docs/rules
# Python version to target
target-version = "py313"

select = [
# Pyflakes
"F",
# pycodestyle errors
"E",
# pycodestyle warnings
"W",
# isort
"I",
# pep8-naming
"N",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-pytest-style
"PT",
# tryceratops
"TRY",
# flynt
"FLY",
# Enable all rules
"ALL",
]

ignore = [
# Never enforce line length violations. This should be handled by formatters.
# Disable rules that might conflict with the formatter
"COM812",
"COM819",
"D206",
"D300",
"E111",
"E114",
"E117",
"E501",
"ISC002",
"Q000",
"Q001",
"Q002",
"Q003",
"W191",

# Disable some docstring rules that are too strict
"D100",
"D104",
"D105",
"D106",
"D107",
]
Loading