diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 23568f7..c00775d 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -42,3 +42,36 @@ jobs: - name: Run credo run: mix credo + dialyzer: + name: Dialyzer + runs-on: ubuntu-24.04 + + strategy: + fail-fast: false + + steps: + - name: Set up Elixir and OTP + uses: erlef/setup-beam@v1 + with: + elixir-version: ${{ env.elixir_version }} + otp-version: ${{ env.otp_version }} + + - name: Checkout code + uses: actions/checkout@v4 + + - name: 'Restore cache for deps/ and _build/ directories' + uses: actions/cache@v4 + with: + path: | + deps + _build + # Dialyzer uses PLT files for caching project info. These are in _build/dev/, but they're only created + # when running dialyzer for the first time, and updated when the deps change. + key: ${{ runner.os }}-plts-${{ env.elixir_version }}-${{ env.otp_version }}-${{ hashFiles('**/mix.lock') }} + restore-keys: ${{ runner.os }}-plts-${{ env.elixir_version }}-${{ env.otp_version }}- + + - name: Install Mix dependencies + run: mix deps.get + + - name: Run dialyzer + run: mix dialyzer