chore(deps): Refresh mix.lock files #2188
This file contains hidden or 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: Continuous Integration | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - release/** | |
| pull_request: | |
| env: | |
| MIX_ENV: test | |
| jobs: | |
| test: | |
| name: Test (Elixir ${{ matrix.elixir }}, OTP ${{ matrix.otp }}) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # https://hexdocs.pm/elixir/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp | |
| include: | |
| # Newest supported Elixir/Erlang pair. | |
| - elixir: '1.20.2-otp-29' | |
| otp: '29.0.1' | |
| lint: true | |
| dialyzer: true | |
| release_test: true | |
| os: ubuntu-latest | |
| - elixir: '1.19.3-otp-28' | |
| otp: '28.1' | |
| release_test: true | |
| os: ubuntu-latest | |
| - elixir: '1.18.4-otp-27' | |
| otp: '28.0' | |
| release_test: true | |
| os: ubuntu-latest | |
| - elixir: '1.18' | |
| otp: '27.2' | |
| release_test: true | |
| os: ubuntu-latest | |
| # One version before the last supported one. | |
| - elixir: '1.17' | |
| otp: '26.2' | |
| release_test: true | |
| os: ubuntu-22.04 | |
| # Oldest supported Elixir/Erlang pair that's tested; | |
| # However, official support goes back to OTP 22.x | |
| - elixir: '1.13' | |
| otp: '25.3' | |
| os: ubuntu-22.04 | |
| steps: | |
| - name: Check out this repository | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| - name: Setup Elixir and Erlang | |
| uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # v1.24.0 | |
| with: | |
| elixir-version: ${{ matrix.elixir }} | |
| otp-version: ${{ matrix.otp }} | |
| - name: Cache downloaded dependencies | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 | |
| id: mix-downloaded-deps-cache | |
| with: | |
| path: | | |
| deps | |
| test_integrations/umbrella/deps | |
| test_integrations/phoenix_app/deps | |
| test_integrations/legacy_otel/deps | |
| key: | | |
| ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-deps-${{ hashFiles('**/mix*.lock') }} | |
| - name: Download Mix dependencies | |
| if: steps.mix-downloaded-deps-cache.outputs.cache-hit != 'true' | |
| run: | | |
| mix deps.get --check-locked | |
| if [ ${{ matrix.elixir }} != '1.13' ]; then | |
| cd test_integrations/phoenix_app | |
| if [ ${{ matrix.lint }} == 'true' ]; then | |
| mix deps.get --check-locked | |
| else | |
| mix deps.get | |
| fi | |
| fi | |
| # Key this cache on the full mix.lock hash with NO restore-keys: a fallback prefix would | |
| # restore "_build" compiled against an older lockfile, leaving stale compiled deps that | |
| # fail "mix test"'s dependency check after a dependency bump. | |
| - name: Cache compiled Elixir code | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 | |
| id: mix-cache | |
| with: | |
| path: | | |
| _build | |
| test_integrations/phoenix_app/_build | |
| key: | | |
| ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles('**/mix*.lock') }} | |
| - name: Compile Elixir code (with --warnings-as-errors) | |
| if: matrix.lint | |
| run: | | |
| mix compile --warnings-as-errors | |
| cd test_integrations/phoenix_app | |
| mix compile --warnings-as-errors | |
| - name: Check formatting | |
| if: matrix.lint | |
| run: mix format --check-formatted | |
| - name: Run tests | |
| run: mix test | |
| - name: Run integration tests | |
| env: | |
| SKIP_TRACING_E2E: "true" | |
| run: mix test.integrations | |
| - name: Ensure lockfiles are unchanged | |
| if: matrix.elixir == '1.13' | |
| run: git diff --exit-code -- mix-1.13-1.14.lock mix-1.15-1.17.lock mix-1.18.lock mix.lock 'test_integrations/*/mix.lock' 'test_integrations/*/mix-*.lock' | |
| - name: Check `mix release` with phoenix_app and sentry configured | |
| if: matrix.release_test | |
| run: | | |
| cd test_integrations/phoenix_app | |
| MIX_ENV=prod mix release | |
| - name: Cache Dialyzer PLT | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 | |
| if: matrix.dialyzer | |
| id: plt-cache | |
| with: | |
| path: plts | |
| key: | | |
| ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts-${{ hashFiles(format('**/mix.lock')) }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts- | |
| - name: Create PLTs | |
| if: steps.plt-cache.outputs.cache-hit != 'true' && matrix.dialyzer | |
| run: | | |
| mkdir -p plts | |
| mix dialyzer --plt | |
| - name: Run dialyzer | |
| if: matrix.dialyzer | |
| run: mix dialyzer --no-check |