update version #1268
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 Test | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
container: | |
image: hexpm/elixir:1.18.0-erlang-27.2-debian-bullseye-20241202 | |
steps: | |
- name: Install git | |
run: | | |
apt-get update | |
apt-get install -y git | |
- name: Checkout repository and submodules | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
with: | |
submodules: recursive | |
- name: Update submodules | |
run: | | |
git config --global --add safe.directory /__w/elixir-analyzer/elixir-analyzer | |
git submodule update --recursive --remote | |
- name: Install Dependencies | |
run: | | |
mix local.rebar --force | |
mix local.hex --force | |
mix deps.get | |
- name: Run Tests | |
run: mix test --exclude external | |
- name: Update coverage badge on push | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
run: mix coveralls.github --exclude external | |
env: | |
MIX_ENV: test | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check formatting | |
run: mix format --check-formatted | |
- name: Run Credo | |
run: mix credo | |
- name: Retrieve PLT Cache | |
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a | |
id: plt-cache | |
with: | |
path: priv/plts | |
key: elixir:1.18.0-erlang-27.2-debian-bullseye-20241202-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}-v3 | |
- name: Create PLTs | |
if: steps.plt-cache.outputs.cache-hit != 'true' | |
run: | | |
mkdir -p priv/plts | |
mix dialyzer --plt | |
- name: Run dialyzer | |
run: mix dialyzer | |
smoke-test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Run Smoke Test in Docker | |
run: bin/run-tests-in-docker.sh |