Skip to content
Merged
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
38 changes: 38 additions & 0 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Elixir CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read
id-token: write

jobs:
build:

name: Build and test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: '1.17.3'
Copy link

Copilot AI Dec 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Elixir version 1.17.3 specified here is incompatible with the version constraint in mix.exs (line 8), which specifies "> 1.15". The ">" operator means >= 1.15.0 and < 1.16.0, so Elixir 1.17.3 will not satisfy this constraint. This will cause the CI build to fail or produce misleading results since it's testing with a version outside the declared compatibility range. Either update the CI to use a 1.15.x version or update mix.exs to support 1.17.x (e.g., "> 1.15" should be changed to "> 1.15 or ~> 1.17" or use a range like ">= 1.15.0").

Suggested change
elixir-version: '1.17.3'
elixir-version: '1.15.7'

Copilot uses AI. Check for mistakes.
otp-version: '26.2.5'
- name: Install dependencies
run: mix deps.get
Copy link

Copilot AI Dec 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow is missing important code quality checks that are standard for Elixir projects. Consider adding steps to run mix compile --warnings-as-errors (to catch compilation warnings), mix format --check-formatted (to verify code formatting since .formatter.exs exists in the project), and potentially mix credo or mix dialyzer if those tools are added to the project. These checks help maintain code quality and catch issues early.

Suggested change
run: mix deps.get
run: mix deps.get
- name: Compile (warnings as errors)
run: mix compile --warnings-as-errors
- name: Check formatting
run: mix format --check-formatted

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Dec 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow runs mix test immediately after installing dependencies, without an explicit compilation step. While mix test will compile the code automatically, adding an explicit mix compile step before running tests would make build failures clearer and separate compilation issues from test failures in the CI logs. This is particularly helpful when debugging CI failures.

Suggested change
run: mix deps.get
run: mix deps.get
- name: Compile
run: mix compile

Copilot uses AI. Check for mistakes.
- name: Run tests with coverage
run: mix lcov
- uses: qltysh/qlty-action/coverage@ea1eaf434a27bf50cd544153084fbb11c52aaf84
with:
oidc: true
files: cover/lcov.info
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule Sample.MixProject do
[
app: :sample,
version: "0.1.0",
elixir: "~> 1.19",
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
deps: deps(),
test_coverage: [
Expand Down