feat(cre): source tree skeleton with empty module dirs and CI workflow
- src/cre.cr entry point + version.cr - Empty module dirs: cli, tui, engine, events, rotators, policy, audit, crypto, persistence, notifiers, compliance, config, domain, aws, vault, github, demo - spec/ unit + integration + fixtures structure mirroring src/ - spec_helper.cr with stdlib spec + cre require - GitHub Actions CI: format, unit matrix (Crystal 1.19/1.20/nightly x ubuntu/macos), integration with PG service, build job
This commit is contained in:
parent
e69cc301cf
commit
8ebdd3fee7
|
|
@ -0,0 +1,73 @@
|
||||||
|
# ©AngelaMos | 2026
|
||||||
|
# ci.yml
|
||||||
|
|
||||||
|
name: CI - Credential Rotation Enforcer
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'PROJECTS/intermediate/credential-rotation-enforcer/**'
|
||||||
|
- '.github/workflows/cre-*.yml'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'PROJECTS/intermediate/credential-rotation-enforcer/**'
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: PROJECTS/intermediate/credential-rotation-enforcer
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
format:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: crystal-lang/install-crystal@v1
|
||||||
|
with:
|
||||||
|
crystal: 1.20.0
|
||||||
|
- run: crystal tool format --check
|
||||||
|
|
||||||
|
unit:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest]
|
||||||
|
crystal: ["1.19.0", "1.20.0", "nightly"]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: crystal-lang/install-crystal@v1
|
||||||
|
with:
|
||||||
|
crystal: ${{ matrix.crystal }}
|
||||||
|
- run: shards install
|
||||||
|
- run: crystal spec spec/unit --order=random
|
||||||
|
|
||||||
|
integration:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:16
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: cre_test
|
||||||
|
POSTGRES_PASSWORD: cre_test
|
||||||
|
POSTGRES_DB: cre_test
|
||||||
|
ports: [5432:5432]
|
||||||
|
options: --health-cmd "pg_isready -U cre_test" --health-interval 10s
|
||||||
|
env:
|
||||||
|
DATABASE_URL: postgres://cre_test:cre_test@localhost:5432/cre_test
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: crystal-lang/install-crystal@v1
|
||||||
|
with:
|
||||||
|
crystal: 1.20.0
|
||||||
|
- run: shards install
|
||||||
|
- run: crystal spec spec/integration --order=random
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: crystal-lang/install-crystal@v1
|
||||||
|
with:
|
||||||
|
crystal: 1.20.0
|
||||||
|
- run: shards install
|
||||||
|
- run: shards build cre --release
|
||||||
0
PROJECTS/intermediate/credential-rotation-enforcer/spec/fixtures/policies/.gitkeep
vendored
Normal file
0
PROJECTS/intermediate/credential-rotation-enforcer/spec/fixtures/policies/.gitkeep
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
# ===================
|
||||||
|
# ©AngelaMos | 2026
|
||||||
|
# spec_helper.cr
|
||||||
|
# ===================
|
||||||
|
|
||||||
|
require "spec"
|
||||||
|
require "../src/cre"
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
# ===================
|
||||||
|
# ©AngelaMos | 2026
|
||||||
|
# cre.cr
|
||||||
|
# ===================
|
||||||
|
|
||||||
|
require "./cre/version"
|
||||||
|
|
||||||
|
module CRE
|
||||||
|
def self.main(argv : Array(String)) : Int32
|
||||||
|
0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if PROGRAM_NAME.includes?("cre")
|
||||||
|
exit CRE.main(ARGV)
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
# ===================
|
||||||
|
# ©AngelaMos | 2026
|
||||||
|
# version.cr
|
||||||
|
# ===================
|
||||||
|
|
||||||
|
module CRE
|
||||||
|
VERSION = "0.1.0"
|
||||||
|
end
|
||||||
Loading…
Reference in New Issue