chore: Revert "chore: Switch Elixir tests back to pipes" #478
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Elixir CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
elixir-ci: | |
name: Elixir ${{ matrix.elixir }} (OTP ${{ matrix.otp }}) | |
env: | |
LANG: en_US.UTF-8 | |
LC_CTYPE: en_US.UTF-8 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- elixir: '1.10' | |
otp: '21' | |
os: ubuntu-20.04 | |
- elixir: '1.11' | |
otp: '21' | |
os: ubuntu-20.04 | |
- elixir: '1.11' | |
otp: '23' | |
os: ubuntu-20.04 | |
- elixir: '1.12' | |
otp: '24' | |
os: ubuntu-22.04 | |
- elixir: '1.13' | |
otp: '24' | |
os: ubuntu-22.04 | |
- elixir: '1.14' | |
otp: '25' | |
os: ubuntu-22.04 | |
- 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 | |
check_formatted: true | |
warnings_as_errors: true | |
dialyzer: true | |
credo: true | |
- elixir: '1.18' | |
otp: '27' | |
os: ubuntu-22.04 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/[email protected] | |
with: | |
persist-credentials: false | |
- uses: erlef/[email protected] | |
id: install | |
with: | |
otp-version: ${{ matrix.otp }} | |
elixir-version: ${{ matrix.elixir }} | |
- uses: actions/[email protected] | |
with: | |
key: builds@elixir-${{ steps.install.outputs.elixir-version }}-otp-${{ steps.install.outputs.otp-version }}-mix-${{ hashFiles('mix.lock') }} | |
path: | | |
elixir/deps | |
elxir/_build | |
- run: mix 'do' deps.get, deps.compile | |
working-directory: ./elixir | |
- run: mix format --check-formatted | |
working-directory: ./elixir | |
if: matrix.check_formatted | |
- run: mix compile --warnings-as-errors | |
working-directory: ./elixir | |
if: matrix.warnings_as_errors | |
- run: mix compile | |
working-directory: ./elixir | |
if: ${{ !matrix.warnings_as_errors }} | |
- run: mix test | |
working-directory: ./elixir | |
# Using MIX_QUIET=1 should work for this, except that with older versions | |
# of Elixir and OTP (OTP 25 or earlier), there's a persistent truncation | |
# of the output as the generator VM shuts down before stdout is complete | |
# which is not exhibited with Mix shell write but is exhibited with IO | |
# write. | |
- run: | | |
# mix app_identity generate --stdout | | |
# mix app_identity run --diagnostic --stdin --strict | |
mix app_identity generate | |
mix app_identity run --diagnostic --strict app-identity-suite-elixir.json | |
rm -f app-identity-suite-elixir.json | |
working-directory: ./elixir | |
- run: mix credo --strict | |
working-directory: ./elixir | |
if: matrix.credo | |
- uses: actions/[email protected] | |
with: | |
key: plts@elixir-${{ steps.install.outputs.elixir-version }}-otp-${{ steps.install.outputs.otp-version }}-mix-${{ hashFiles('mix.lock') }} | |
path: | | |
elixir/priv/plts | |
restore-keys: | | |
plts@elixir-${{ steps.install.outputs.elixir-version }}-otp-${{ steps.install.outputs.otp-version }}-mix- | |
- run: mix dialyzer | |
working-directory: ./elixir | |
if: matrix.dialyzer |