Skip to content

docs(release): sync roadmap, changelog, guides, and README for 1.0.0 #908

docs(release): sync roadmap, changelog, guides, and README for 1.0.0

docs(release): sync roadmap, changelog, guides, and README for 1.0.0 #908

Workflow file for this run

# 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: Test
on:
push:
branches: ["main"]
pull_request:
permissions:
contents: read
jobs:
build:
name: Build and test (${{ matrix.elixir }} / OTP ${{ matrix.otp }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- elixir: "1.19.0"
# 28.1+, not 28.0: Hex 2.5.0 (setup-beam's autoinstalled default)
# calls :re.import/1, which only exists in OTP 28.1+.
otp: "28.1"
bootstrap_beam: false
# OTP 29 RC's :httpc can't reach builds.hex.pm, so we tell setup-beam
# to skip Hex/Rebar autoinstall and curl them ourselves below.
- elixir: "1.20.0"
otp: "29.0"
bootstrap_beam: true
steps:
- name: Checkout
uses: actions/checkout@v4
- &install-luajit
name: Install LuaJIT
run: |
sudo apt-get update
sudo apt-get install -y luajit libluajit-5.1-dev
- &setup-beam
name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
version-type: strict
install-hex: ${{ !matrix.bootstrap_beam }}
install-rebar: ${{ !matrix.bootstrap_beam }}
- &bootstrap-beam
name: Bootstrap Hex/Rebar via curl (OTP 29 RC :httpc workaround)
if: matrix.bootstrap_beam
run: |
curl -fsSL --retry 3 -o /tmp/hex.ez \
https://builds.hex.pm/installs/1.19.0/hex-2.4.2-otp-28.ez
mix archive.install /tmp/hex.ez --force
curl -fsSL --retry 3 -o /tmp/rebar3 \
https://github.com/erlang/rebar3/releases/download/3.25.1/rebar3
chmod +x /tmp/rebar3
mix local.rebar rebar3 /tmp/rebar3 --force
- &cache-deps
name: Restore dependencies cache
uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-elixir${{ matrix.elixir }}-otp${{ matrix.otp }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-elixir${{ matrix.elixir }}-otp${{ matrix.otp }}-mix-
- &install-deps
name: Install dependencies
run: mix deps.get
- name: Run tests
# :lua53 is opt-in locally (excluded by default); include it here so
# the curated Lua 5.3 suite stays enforced in CI.
run: mix test --include lua53
- name: Format
run: mix format --check-formatted
- name: Docs
run: mix docs --warnings-as-errors
website:
name: Website tests
runs-on: ubuntu-latest
strategy:
matrix:
include:
- elixir: "1.19.0"
# 28.1+, not 28.0: Hex 2.5.0 (setup-beam's autoinstalled default)
# calls :re.import/1, which only exists in OTP 28.1+.
otp: "28.1"
bootstrap_beam: false
steps:
- name: Checkout
uses: actions/checkout@v4
- *setup-beam
- *bootstrap-beam
- name: Restore website dependencies cache
uses: actions/cache@v4
with:
path: website/deps
key: ${{ runner.os }}-elixir${{ matrix.elixir }}-otp${{ matrix.otp }}-website-mix-${{ hashFiles('website/mix.lock') }}
restore-keys: ${{ runner.os }}-elixir${{ matrix.elixir }}-otp${{ matrix.otp }}-website-mix-
- name: Install website dependencies
working-directory: website
run: mix deps.get
- name: Run website tests
working-directory: website
run: mix test
- name: Format
working-directory: website
run: mix format --check-formatted
lua53-suite:
name: Lua 5.3 suite
runs-on: ubuntu-latest
# Reports suite pass/fail count but does not block PRs on deferred tests.
# See ROADMAP.md "Deferred" section for files intentionally skipped.
continue-on-error: true
strategy:
matrix:
include:
- elixir: "1.19.0"
# 28.1+, not 28.0: Hex 2.5.0 (setup-beam's autoinstalled default)
# calls :re.import/1, which only exists in OTP 28.1+.
otp: "28.1"
bootstrap_beam: false
steps:
- name: Checkout
uses: actions/checkout@v4
- *install-luajit
- *setup-beam
- *bootstrap-beam
- *cache-deps
- *install-deps
- name: Run Lua 5.3 suite (only)
id: suite
run: |
# Run the suite tests, capture summary line.
mix test --only lua53 2>&1 | tee suite-output.txt
# Extract and parse "N tests, M failures, K skipped" from the output.
summary=$(grep -E '^[0-9]+ tests?, [0-9]+ failures' suite-output.txt | tail -1)
echo "suite_summary=$summary" >> $GITHUB_OUTPUT
# Always exit 0 so the count is reported even if some files fail.
# Use "Run full suite survey" below for the per-file breakdown.
exit 0
- name: Run full suite survey
# Walk every file in test/lua53_tests/ to get per-file PASS/FAIL,
# not just the curated @ready_tests subset. Reports counts to the
# GitHub Actions job summary so PR reviewers can see the delta.
run: |
cat > /tmp/suite_survey.exs <<'EOF'
# Skip "all.lua" — it's the upstream Lua harness, not a test file.
tests =
"test/lua53_tests"
|> File.ls!()
|> Enum.filter(&String.ends_with?(&1, ".lua"))
|> Enum.reject(&(&1 == "all.lua"))
|> Enum.sort()
run_test = fn test_file ->
path = Path.join("test/lua53_tests", test_file)
source = File.read!(path)
lua = Lua.new(exclude: [[:package], [:require], [:load], [:loadstring], [:loadfile], [:dofile]])
test_dir = Path.dirname(path)
lua = Lua.set_lua_paths(lua, [Path.join(test_dir, "?.lua")])
task = Task.async(fn ->
try do
{_, _} = Lua.eval!(lua, source)
:pass
rescue
e ->
msg = case e do
%{value: v} when is_binary(v) -> v
%{value: v} -> inspect(v)
_ -> Exception.message(e)
end
{:fail, msg |> String.replace(~r/\e\[[\d;]+m/, "") |> String.slice(0, 100)}
catch
_, e -> {:fail, inspect(e) |> String.slice(0, 100)}
end
end)
case Task.yield(task, 8_000) || Task.shutdown(task, :brutal_kill) do
{:ok, r} -> r
nil -> {:fail, "TIMEOUT (8s)"}
end
end
results = Enum.map(tests, fn t -> {t, run_test.(t)} end)
passing = Enum.count(results, fn {_, r} -> r == :pass end)
total = length(results)
IO.puts("\n=== Lua 5.3 suite: #{passing}/#{total} passing ===\n")
for {name, result} <- results do
case result do
:pass -> IO.puts("PASS #{name}")
{:fail, msg} -> IO.puts("FAIL #{name}: #{msg}")
end
end
IO.puts("\n#{passing}/#{total}")
EOF
mix run /tmp/suite_survey.exs | tee suite-survey.txt
# Append the human-readable summary to the GitHub Actions step summary.
{
echo "## Lua 5.3 official suite"
echo ""
echo "\`\`\`"
cat suite-survey.txt
echo "\`\`\`"
} >> $GITHUB_STEP_SUMMARY
dialyzer:
name: Dialyzer
runs-on: ubuntu-latest
strategy:
matrix:
include:
- elixir: "1.19.0"
# 28.1+, not 28.0: Hex 2.5.0 (setup-beam's autoinstalled default)
# calls :re.import/1, which only exists in OTP 28.1+.
otp: "28.1"
bootstrap_beam: false
steps:
- name: Checkout
uses: actions/checkout@v4
- *install-luajit
- *setup-beam
- *bootstrap-beam
- *cache-deps
- *install-deps
- name: Restore PLT cache
uses: actions/cache@v4
with:
path: priv/plts
key: ${{ runner.os }}-elixir${{ matrix.elixir }}-otp${{ matrix.otp }}-plt-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-elixir${{ matrix.elixir }}-otp${{ matrix.otp }}-plt-
- name: Build PLT
run: mix dialyzer --plt
- name: Run dialyzer
run: mix dialyzer