Skip to content

Commit b65618b

Browse files
author
Markus Howard
committed
initial commit
0 parents  commit b65618b

File tree

17 files changed

+1095
-0
lines changed

17 files changed

+1095
-0
lines changed

.devcontainer/.zshrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Path to your oh-my-zsh installation
2+
export ZSH="$HOME/.oh-my-zsh"
3+
4+
# Set name of the theme to load --- if set to "random", it will load a random theme each time oh-my-zsh is loaded
5+
ZSH_THEME="robbyrussell"
6+
7+
# Plugins
8+
plugins=(git aws)
9+
10+
source $ZSH/oh-my-zsh.sh
11+
12+
eval "$(starship init zsh)"
13+
14+
# Aliases
15+
alias ll='ls -al'

.devcontainer/Dockerfile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
FROM mcr.microsoft.com/devcontainers/base:bullseye
2+
3+
# Update and install dependencies
4+
RUN apt-get update && \
5+
apt-get install -y --no-install-recommends \
6+
curl \
7+
lsb-release \
8+
gnupg \
9+
ca-certificates \
10+
software-properties-common \
11+
apt-transport-https \
12+
jq \
13+
shellcheck \
14+
unzip \
15+
libc6 \
16+
&& rm -rf /var/lib/apt/lists/*
17+
18+
# Install Node.js
19+
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
20+
apt-get install -y nodejs && \
21+
npm install -g npm@latest
22+
23+
RUN node --version && \
24+
npm --version
25+
26+
# Install Python 3 and pip
27+
RUN apt-get install -y python3 python3-pip && \
28+
ln -s /usr/bin/python3 /usr/bin/python && \
29+
pip3 install --upgrade pip setuptools
30+
31+
RUN python --version && \
32+
pip --version
33+
34+
# Install uv
35+
RUN pip install uv
36+
37+
RUN curl -sS https://starship.rs/install.sh | sh -s -- -y
38+
39+
COPY .devcontainer.zshrc /home/vscode/

.devcontainer/devcontainer.json

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
3+
{
4+
"name": "Typescript Starter",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
// "image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bullseye",
7+
"build": {
8+
"dockerfile": "Dockerfile",
9+
// Use 'context' to specify a custom build context. More info: https://aka.ms/vscode-remote/containers/dockerfile-context
10+
"context": "..",
11+
// Use 'args' to pass build arguments. More info: https://aka.ms/vscode-remote/containers/dockerfile-args
12+
"args": {
13+
// "VARIANT": "22-bullseye"
14+
}
15+
},
16+
"features": {
17+
"ghcr.io/devcontainers/features/common-utils:2": {
18+
"installZsh": true,
19+
"configureZshAsDefaultShell": true,
20+
"installOhMyZsh": true,
21+
"installOhMyZshConfig": true,
22+
"upgradePackages": true,
23+
"username": "vscode",
24+
"userUid": "automatic",
25+
"userGid": "automatic"
26+
},
27+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
28+
"moby": true,
29+
"azureDnsAutoDetection": true,
30+
"installDockerBuildx": true,
31+
"installDockerComposeSwitch": true,
32+
"version": "latest",
33+
"dockerDashComposeVersion": "v2"
34+
}
35+
},
36+
37+
// Features to add to the dev container. More info: https://containers.dev/features.
38+
// "features": {},
39+
40+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
41+
// "forwardPorts": [],
42+
43+
// Use 'postCreateCommand' to run commands after the container is created.
44+
// "postCreateCommand": "yarn install",
45+
46+
// Configure tool-specific properties.
47+
"customizations": {
48+
"vscode": {
49+
"settings": {
50+
"terminal.integrated.defaultProfile.linux": "zsh",
51+
"editor.formatOnSave": true,
52+
"typescript.tsserver.log": "verbose",
53+
"typescript.tsserver.trace": "verbose",
54+
"editor.tabSize": 4,
55+
"[javascript]": {
56+
"editor.tabSize": 4
57+
},
58+
"[typescript]": {
59+
"editor.tabSize": 4
60+
},
61+
"[json]": {
62+
"editor.tabSize": 4
63+
},
64+
"explorer.sortOrder": "type"
65+
},
66+
"extensions": [
67+
"esbenp.prettier-vscode",
68+
"redhat.vscode-yaml",
69+
"vscode-icons-team.vscode-icons",
70+
"firsttris.vscode-jest-runner",
71+
"mikestead.dotenv",
72+
"DavidAnson.vscode-markdownlint",
73+
"dbaeumer.vscode-eslint"
74+
]
75+
}
76+
}
77+
78+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
79+
// "remoteUser": "root"
80+
}

.gitattributes

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Common settings that generally should always be used with your language specific settings
2+
3+
# Auto detect text files and perform LF normalization
4+
# https://www.davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/
5+
* text=auto
6+
7+
#
8+
# The above will handle all files NOT found below
9+
#
10+
11+
# Documents
12+
*.bibtex text diff=bibtex
13+
*.doc diff=astextplain
14+
*.DOC diff=astextplain
15+
*.docx diff=astextplain
16+
*.DOCX diff=astextplain
17+
*.dot diff=astextplain
18+
*.DOT diff=astextplain
19+
*.pdf diff=astextplain
20+
*.PDF diff=astextplain
21+
*.rtf diff=astextplain
22+
*.RTF diff=astextplain
23+
*.md text
24+
*.tex text diff=tex
25+
*.adoc text
26+
*.textile text
27+
*.mustache text
28+
*.csv text
29+
*.tab text
30+
*.tsv text
31+
*.txt text
32+
*.sql text
33+
34+
# Graphics
35+
*.png binary
36+
*.jpg binary
37+
*.jpeg binary
38+
*.gif binary
39+
*.tif binary
40+
*.tiff binary
41+
*.ico binary
42+
# SVG treated as an asset (binary) by default.
43+
*.svg text
44+
# If you want to treat it as binary,
45+
# use the following line instead.
46+
# *.svg binary
47+
*.eps binary
48+
49+
# Scripts
50+
*.bash text eol=lf
51+
*.fish text eol=lf
52+
*.sh text eol=lf
53+
# These are explicitly windows files and should use crlf
54+
*.bat text eol=crlf
55+
*.cmd text eol=crlf
56+
*.ps1 text eol=crlf
57+
58+
# Serialisation
59+
*.json text
60+
*.toml text
61+
*.xml text
62+
*.yaml text
63+
*.yml text
64+
65+
# Terraform
66+
*.tf text
67+
*.tfvars text
68+
69+
# Archives
70+
*.7z binary
71+
*.gz binary
72+
*.tar binary
73+
*.tgz binary
74+
*.zip binary
75+
76+
# Text files where line endings should be preserved
77+
*.patch -text
78+
79+
#
80+
# Exclude files from exporting
81+
#
82+
83+
.gitattributes export-ignore
84+
.gitignore export-ignore

.github/workflows/ci.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
env:
10+
NODE_VERSION: '22'
11+
PULUMI_VERSION: '3.181.0'
12+
13+
jobs:
14+
lint:
15+
name: 'Code Quality & Linting'
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 10
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: ${{ env.NODE_VERSION }}
27+
cache: 'npm'
28+
29+
- name: Install dependencies
30+
run: npm ci
31+
32+
- name: Build TypeScript
33+
run: npm run build
34+
35+
- name: Run ESLint
36+
run: npm run lint:check
37+
38+
- name: Check Prettier formatting
39+
run: npm run format:check
40+
41+
security:
42+
name: 'Security Scan'
43+
runs-on: ubuntu-latest
44+
timeout-minutes: 10
45+
46+
steps:
47+
- name: Checkout code
48+
uses: actions/checkout@v4
49+
50+
- name: Setup Node.js
51+
uses: actions/setup-node@v4
52+
with:
53+
node-version: ${{ env.NODE_VERSION }}
54+
cache: 'npm'
55+
56+
- name: Install dependencies
57+
run: npm ci
58+
59+
- name: Run npm audit
60+
run: npm audit --audit-level=high
61+
62+
test:
63+
name: 'Test Suite'
64+
runs-on: ubuntu-latest
65+
timeout-minutes: 15
66+
67+
steps:
68+
- name: Checkout code
69+
uses: actions/checkout@v4
70+
71+
- name: Setup Node.js
72+
uses: actions/setup-node@v4
73+
with:
74+
node-version: ${{ env.NODE_VERSION }}
75+
cache: 'npm'
76+
77+
- name: Install dependencies
78+
run: npm ci
79+
80+
- name: Build TypeScript
81+
run: npm run build
82+
83+
- name: Run unit tests
84+
run: npm run test:cov
85+
86+
- name: Upload coverage reports
87+
uses: codecov/codecov-action@v4
88+
if: always()
89+
with:
90+
token: ${{ secrets.CODECOV_TOKEN }}
91+
files: ./coverage/lcov.info
92+
fail_ci_if_error: false

.github/workflows/deploy.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
inputs:
9+
environment:
10+
description: 'Environment to deploy to'
11+
required: true
12+
default: 'dev'
13+
type: choice
14+
options:
15+
- dev
16+
- val
17+
- prd
18+
19+
env:
20+
NODE_VERSION: '22'
21+
22+
jobs:
23+
deploy:
24+
name: 'Deploy'
25+
needs: determine-environment
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 90
28+
environment:
29+
name: ${{ needs.determine-environment.outputs.environment }}
30+
31+
steps:
32+
- name: Checkout code
33+
uses: actions/checkout@v4
34+
35+
- name: Setup Node.js
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: ${{ env.NODE_VERSION }}
39+
cache: 'npm'

0 commit comments

Comments
 (0)