74 lines
1.8 KiB
YAML
74 lines
1.8 KiB
YAML
# ©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
|