Skip to content

Update erlang to 27.2 #7

Update erlang to 27.2

Update erlang to 27.2 #7

Workflow file for this run

name: build
on:
push:
branches:
- '**/*'
workflow_dispatch:
jobs:
build:
name: build
runs-on: ubuntu-24.04
env:
MINESWEEPER_DATABASE_URL: ecto://minesweeper:minesweeper@localhost/minesweeper
MINESWEEPER_SECRET_KEY_BASE: secret
strategy:
# Matrix based on:
# - https://hexdocs.pm/elixir/compatibility-and-deprecations.html
# - https://endoflife.date/elixir
# - https://endoflife.date/erlang
matrix:
elixir: [1.17.3]
erlang: [27.1.3]
node: [18, 20, 22]
postgres: [13, 14, 15, 16, 17]
include:
- elixir: 1.14.5
erlang: 25.3.2.16
node: 22
postgres: 17
- elixir: 1.14.5
erlang: 26.2.5.6
node: 22
postgres: 17
- elixir: 1.15.8
erlang: 25.3.2.16
node: 22
postgres: 17
- elixir: 1.15.8
erlang: 26.2.5.6
node: 22
postgres: 17
- elixir: 1.16.3
erlang: 25.3.2.16
node: 22
postgres: 17
- elixir: 1.16.3
erlang: 26.2.5.6
node: 22
postgres: 17
- elixir: 1.17.3
erlang: 25.3.2.16
node: 22
postgres: 17
- elixir: 1.17.3
erlang: 26.2.5.6
node: 22
postgres: 17
services:
postgres:
image: postgres:${{ matrix.postgres }}
ports:
- 5432:5432
env:
POSTGRES_DB: minesweeper
POSTGRES_USER: minesweeper
POSTGRES_PASSWORD: minesweeper
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
# https://github.com/actions/checkout
- name: Checkout the repository
uses: actions/checkout@v4
# https://github.com/actions/cache
- name: Cache build
uses: actions/cache@v4
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-erlang-${{ matrix.erlang }}-elixir-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-erlang-${{ matrix.erlang }}-elixir-${{ matrix.elixir }}-
# https://github.com/erlef/setup-beam
- name: Install Erlang/OTP & Elixir
uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.erlang }}
elixir-version: ${{ matrix.elixir }}
# https://github.com/asdf-vm/actions#setup
- name: Install asdf
uses: asdf-vm/actions/setup@v3
with:
asdf_branch: v0.14.1
- name: Install Node.js with asdf
run: |
asdf plugin add nodejs
asdf install nodejs
node --version
- name: Install backend dependencies
run: |
mix deps.get
- name: Install frontend dependencies
run: |
npm ci
- name: Compile the application
run: |
mix compile
- name: Create and migrate the database
run: |
mix ecto.create
mix ecto.migrate
- name: Run automated tests & measure code coverage for the backend
id: tests
run: |
mix coveralls.html --raise
- name: Check backend code formatting
run: |
mix format --check-formatted
- name: Check for unused dependencies
run: |
mix deps.unlock --check-unused
- name: Show retired dependencies
run: |
mix hex.audit
- name: Ensure there are no uncommitted changes
run: |
git status --porcelain
test -z "$(git status --porcelain)"