ref:5e4a56bc4b117a0d93eb19b582682358bfcbad73

chore: replace GitHub Actions with Anvil CI

Remove GitHub Actions workflows (ci.yml, release.yml) and add .anvil.yml for self-hosted CI on Anvil. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SHA: 5e4a56bc4b117a0d93eb19b582682358bfcbad73
Author: Cole Christensen <cole.christensen@macmillan.com>
Date: 2026-03-14 05:54
Parents: 4dd9e11
3 files changed +34 -179
Type
.anvil.yml +34 −0
@@ -1,0 +1,34 @@
image: hexpm/elixir:1.18.4-erlang-28.0.2-debian-bookworm-20250811
steps:
- name: deps
run: |
set -e
apt-get update && apt-get install -y --no-install-recommends git build-essential
git config --global --add safe.directory /workspace
export MIX_HOME=/workspace/.mix
mix local.hex --force && mix local.rebar --force
mix deps.get
- name: compile
run: |
set -e
export MIX_HOME=/workspace/.mix
mix compile --warnings-as-errors
depends_on: [deps]
- name: format
run: |
set -e
export MIX_HOME=/workspace/.mix
mix format --check-formatted
depends_on: [deps]
- name: test
run: |
set -e
apt-get update && apt-get install -y --no-install-recommends git
git config --global --add safe.directory /workspace
git config --global init.defaultBranch main
git config --global user.email "ci@anvil.test"
git config --global user.name "CI"
export MIX_HOME=/workspace/.mix
mix test
depends_on: [compile]
.github/workflows/ci.yml +0 −121
@@ -1,121 +1,0 @@
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
env:
MIX_ENV: test
ELIXIR_VERSION: "1.17"
OTP_VERSION: "27"
jobs:
compile:
name: Compile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
elixir-version: ${{ env.ELIXIR_VERSION }}
otp-version: ${{ env.OTP_VERSION }}
- uses: actions/cache@v4
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-${{ hashFiles('mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- run: mix deps.get
- run: mix compile --warnings-as-errors
test:
name: Test
needs: compile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
elixir-version: ${{ env.ELIXIR_VERSION }}
otp-version: ${{ env.OTP_VERSION }}
- uses: actions/cache@v4
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-${{ hashFiles('mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- run: mix deps.get
- run: mix test
format:
name: Format
needs: compile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
elixir-version: ${{ env.ELIXIR_VERSION }}
otp-version: ${{ env.OTP_VERSION }}
- uses: actions/cache@v4
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-${{ hashFiles('mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- run: mix deps.get
- run: mix format --check-formatted
license:
name: License Check
needs: compile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
elixir-version: ${{ env.ELIXIR_VERSION }}
otp-version: ${{ env.OTP_VERSION }}
- uses: actions/cache@v4
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-${{ hashFiles('mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- run: mix deps.get
- run: mix license_check
dialyzer:
name: Dialyzer
needs: compile
runs-on: ubuntu-latest
env:
MIX_ENV: dev
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
id: beam
with:
elixir-version: ${{ env.ELIXIR_VERSION }}
otp-version: ${{ env.OTP_VERSION }}
- uses: actions/cache@v4
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-dev-${{ hashFiles('mix.lock') }}
restore-keys: ${{ runner.os }}-mix-dev-
- uses: actions/cache@v4
with:
path: priv/plts
key: plt-${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-${{ hashFiles('mix.lock') }}
- run: mix deps.get
- run: mkdir -p priv/plts
- run: mix dialyzer --plt
- run: mix dialyzer --format github
.github/workflows/release.yml +0 −58
@@ -1,58 +1,0 @@
name: Release
on:
push:
branches: [main]
permissions:
contents: write
jobs:
release:
name: Release to Hex.pm
runs-on: ubuntu-latest
# Only run when a version-tagged commit lands on main
if: startsWith(github.event.head_commit.message, 'Release v')
env:
MIX_ENV: prod
ELIXIR_VERSION: "1.17"
OTP_VERSION: "27"
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
elixir-version: ${{ env.ELIXIR_VERSION }}
otp-version: ${{ env.OTP_VERSION }}
- run: mix deps.get
- run: mix compile
- name: Publish to Hex.pm
run: mix hex.publish --yes
env:
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}
- name: Extract version
id: version
run: |
VERSION=$(mix eval "IO.puts(Mix.Project.config()[:version])" | head -1)
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Create GitHub Release
run: |
gh release create "v${{ steps.version.outputs.version }}" \
--title "v${{ steps.version.outputs.version }}" \
--generate-notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build docs
env:
MIX_ENV: dev
run: |
mix deps.get
mix docs
- name: Publish docs to Hex.pm
run: mix hex.publish docs --yes
env:
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}