Skip to content

chore: Try to clear code scanning alerts #9

chore: Try to clear code scanning alerts

chore: Try to clear code scanning alerts #9

Workflow file for this run

name: Elixir CI
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions: {}
jobs:
elixir-ci:
name: Elixir ${{ matrix.elixir }} (OTP ${{ matrix.otp }})
permissions:
contents: read
env:
LANG: en_US.UTF-8
LC_CTYPE: en_US.UTF-8
strategy:
fail-fast: true
matrix:
include:
- elixir: '1.15'
otp: '26'
os: ubuntu-22.04
- elixir: '1.16'
otp: '26'
os: ubuntu-22.04
- elixir: '1.17'
otp: '27'
os: ubuntu-22.04
- elixir: '1.18'
otp: '27'
os: ubuntu-22.04
check_formatted: true
warnings_as_errors: true
dialyzer: true
credo: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: erlef/setup-beam@5304e04ea2b355f03681464e683d92e3b2f18451 # v1.18.2
id: install
with:
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
key: builds@elixir-${{ steps.install.outputs.elixir-version }}-otp-${{ steps.install.outputs.otp-version }}-mix-${{ hashFiles('mix.lock') }}
path: |
deps
_build
- run: mix 'do' deps.get, deps.compile
- run: mix format --check-formatted
if: matrix.check_formatted
- run: mix compile --warnings-as-errors
if: matrix.warnings_as_errors
- run: mix compile
if: ${{ !matrix.warnings_as_errors }}
- run: mix test
- run: mix credo --strict
if: matrix.credo
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
key: plts@elixir-${{ steps.install.outputs.elixir-version }}-otp-${{ steps.install.outputs.otp-version }}-mix-${{ hashFiles('mix.lock') }}
path: |
priv/plts
restore-keys: |
plts@elixir-${{ steps.install.outputs.elixir-version }}-otp-${{ steps.install.outputs.otp-version }}-mix-
- run: mix dialyzer --format github
if: matrix.dialyzer