Skip to content
Open
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
65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# CI workflow for stackctl.
# Runs on every push and PR to main/dev branches.
# Validates format, linting, type checking, tests, and coverage.
name: CI

on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]

env:
DENO_VERSION: "2.x"

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: ${{ env.DENO_VERSION }}

- name: Cache dependencies
run: deno task cache

- name: Check formatting
run: deno task fmt:check

- name: Lint
run: deno task lint

- name: Type check
run: deno task check

- name: Run tests with coverage
run: deno task test --coverage=.coverage

- name: Generate coverage report
if: success()
run: deno task coverage

build:
runs-on: ubuntu-latest
needs: check
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: ${{ env.DENO_VERSION }}

- name: Build Linux x64
run: deno task build:linux:x64

- name: Upload binary artifact
uses: actions/upload-artifact@v4
with:
name: stackctl-linux-x64
path: dist/stackctl-linux-x64
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# stackctl
.stackctl.local
.stackctl.local.*

# secrets
*.env
!.env.example
*.env.enc
age-key.txt
age.key

# build output
dist/

# rendered stacks
.rendered/

# OS
.DS_Store
Thumbs.db

# editor
.vscode/settings.json
*.swp
*.swo
*~

# test coverage
.coverage/
52 changes: 52 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"name": "@anitrend/stackctl",
"version": "0.1.0-dev",
"exports": "./src/main.ts",
"tasks": {
"cache": "deno cache src/main.ts",
"check": "deno check src/main.ts",
"fmt": "deno fmt",
"fmt:check": "deno fmt --check",
"lint": "deno lint",
"test": "deno test",
"coverage": "deno coverage --detailed",
"build": "deno compile --allow-read --allow-write --allow-env --allow-sys --allow-run=git,docker,sops,age,age-keygen,shred,rm --output dist/stackctl src/main.ts",
"build:darwin:x64": "deno compile --target x86_64-apple-darwin --allow-read --allow-write --allow-env --allow-sys --allow-run=git,docker,sops,age,age-keygen,shred,rm --output dist/stackctl-darwin-x64 src/main.ts",
"build:darwin:arm64": "deno compile --target aarch64-apple-darwin --allow-read --allow-write --allow-env --allow-sys --allow-run=git,docker,sops,age,age-keygen,shred,rm --output dist/stackctl-darwin-arm64 src/main.ts",
"build:linux:x64": "deno compile --target x86_64-unknown-linux-gnu --allow-read --allow-write --allow-env --allow-sys --allow-run=git,docker,sops,age,age-keygen,shred,rm --output dist/stackctl-linux-x64 src/main.ts",
"build:linux:arm64": "deno compile --target aarch64-unknown-linux-gnu --allow-read --allow-write --allow-env --allow-sys --allow-run=git,docker,sops,age,age-keygen,shred,rm --output dist/stackctl-linux-arm64 src/main.ts"
},
"imports": {
"@cliffy/command": "jsr:@cliffy/command@^1.0.0",
"@std/assert": "jsr:@std/assert@^1.0.18",
"@std/dotenv": "jsr:@std/dotenv@^0.225.6",
"@std/fs": "jsr:@std/fs@^1.0.0",
"@std/path": "jsr:@std/path@^1.1.4",
"@std/testing": "jsr:@std/testing@^1.0.17",
"@std/yaml": "jsr:@std/yaml@^1.1.1",
"@std/fmt": "jsr:@std/fmt@^1.0.5"
},
"lint": {
"include": ["src/"],
"rules": {
"tags": ["recommended"],
"exclude": ["no-unused-vars"]
}
},
"fmt": {
"include": ["src/"],
"useTabs": false,
"lineWidth": 100,
"indentWidth": 2,
"singleQuote": false,
"proseWrap": "always"
},
"compilerOptions": {
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"exactOptionalPropertyTypes": false
},
"lock": true,
"nodeModulesDir": "none"
}
68 changes: 68 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading