Skip to content

Latest commit

 

History

History
187 lines (150 loc) · 5.33 KB

File metadata and controls

187 lines (150 loc) · 5.33 KB

Reed's CI Actions - Creation Summary

Created: 2026-02-13 Author: Reed reed@systemic.engineer GPG Key: 99060D23EBFAA0D4

What Was Created

Repository Structure

~/dev/ci/
├── README.md                           # Main documentation
├── CHANGELOG.md                        # Version history
├── LICENSE                             # MIT license
├── SUMMARY.md                          # This file
│
├── actions/                            # Composite actions
│   ├── elixir-setup/
│   │   └── action.yml                  # Setup with caching
│   ├── elixir-test/
│   │   └── action.yml                  # Test runner
│   └── elixir-quality/
│       └── action.yml                  # Quality checks
│
├── .github/workflows/                  # Reusable workflows
│   ├── elixir-ci.yml                   # Single-version CI
│   └── elixir-matrix.yml               # Multi-version matrix
│
└── examples/                           # Usage examples
    ├── basic-ci.yml                    # Simple setup
    ├── matrix-ci.yml                   # Multi-version testing
    └── knigge-style.yml                # Comprehensive testing

Extracted Patterns

From knigge (~700 LOC workflow)

  • Multi-version matrix testing (Elixir 1.7-1.12, OTP 20-24, Alpine 3.11-3.14)
  • Container-based testing with hexpm/elixir images
  • Intelligent caching strategy:
    • deps/ - keyed by mix.lock + versions
    • _build/ - keyed by mix.lock + versions + MIX_ENV
    • .dialyzer/ - keyed by versions only (long-lived)
  • Separate jobs for: tests, coverage, style, type checking
  • Coverage with ExCoveralls GitHub integration

Modernized To

  • Elixir 1.16-1.18, OTP 26-27, Alpine 3.18-3.20
  • actions/cache@v4, actions/checkout@v4, erlef/setup-beam@v1
  • Flexible composite actions
  • Reusable workflows with JSON matrix support

Git Configuration

Repository Setup

cd ~/dev/ci
git config user.name "Reed"
git config user.email "reed@systemic.engineer"
git config user.signingkey "99060D23EBFAA0D4"
git config commit.gpgsign true

GPG Key

  • Key ID: 99060D23EBFAA0D4
  • Fingerprint: 608A873B01F997BE38DDC78399060D23EBFAA0D4
  • Identity: Reed reed@systemic.engineer
  • Type: RSA 4096-bit
  • Created: 2026-02-13
  • Expiration: Never

Public key exported to: /tmp/reed-public-key.asc

Commits

2f85139 Add CHANGELOG.md
4188ed8 Initial commit: Reusable Elixir CI actions

All commits signed with Reed's GPG key.

Integration with Elixir Template

Updated ~/dev/projects/_templates/elixir/.github/workflows/ci.yml:

  • Improved caching patterns from knigge
  • Separate jobs for test, quality, coverage
  • Matrix testing for Elixir 1.17/1.18
  • Comments showing how to use reed/ci actions when published

Usage

Option 1: Direct (when published to GitHub)

steps:
  - uses: reed/ci/actions/elixir-setup@main
    with:
      elixir-version: "1.18"
      otp-version: "27.0"

  - uses: reed/ci/actions/elixir-test@main
    with:
      coverage: true

  - uses: reed/ci/actions/elixir-quality@main

Option 2: Local (for private use)

Copy actions to .github/actions/ and reference locally:

steps:
  - uses: ./.github/actions/elixir-setup
  - uses: ./.github/actions/elixir-test
  - uses: ./.github/actions/elixir-quality

Option 3: Inline (current template approach)

Use the patterns directly in workflow (see examples/).

Next Steps

To publish these actions:

  1. Create GitHub repository: reed/ci or systemic-engineering/ci
  2. Push: git remote add origin <url> && git push -u origin main
  3. Tag version: git tag v0.1.0 && git push --tags
  4. Add GPG public key to GitHub
  5. Update examples to use published actions

To use locally:

  • Reference actions via local path: ./.github/actions/elixir-*
  • Or vendor into project: copy actions/ to project .github/

Design Principles

  1. Composability - Small, focused actions that combine well
  2. Flexibility - All major options exposed as inputs
  3. Intelligence - Smart caching invalidation
  4. Production-ready - Patterns from real-world usage
  5. Documentation - Clear examples for all use cases

Features

elixir-setup

  • Automatic Elixir/OTP setup
  • Three-tier caching (deps, _build, dialyzer)
  • Configurable cache prefixes for versioning
  • Cache hit outputs for conditional steps
  • Alpine version support for containers

elixir-test

  • Compilation with optional warnings-as-errors
  • ExCoveralls integration
  • Multiple coverage formats (github, json, html)
  • Additional test arguments support
  • Configurable MIX_ENV

elixir-quality

  • Format checking
  • Credo (normal and strict modes)
  • Dialyzer type checking
  • All checks optional and configurable
  • Compilation with warnings-as-errors

Why These Actions?

Problem

  • Every Elixir project reinvents CI setup
  • Caching strategies are inconsistent
  • Matrix testing is verbose and error-prone
  • knigge had great patterns but 700+ LOC in one file

Solution

  • Extract patterns into reusable components
  • Provide both composite actions and workflows
  • Include comprehensive examples
  • Document the "why" not just the "how"

Impact

  • DRY across Elixir projects
  • Consistent quality standards
  • Faster CI (better caching)
  • Easier to maintain and update

License

MIT - See LICENSE file