Bump actions/checkout from 5 to 6 in the github-actions-dependencies group #58
Workflow file for this run
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: Elixir CI | |
| # Define workflow that runs when changes are pushed to the `main` branch or pushed to a PR branch | |
| # that targets the `main` branch. | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| # Allow manually running workflow from GitHub UI | |
| workflow_dispatch: | |
| env: | |
| MIX_ENV: test | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| elixir: ["1.18", "1.17", "1.16", "1.15", "1.14"] | |
| otp: ["27", "26"] | |
| include: | |
| - elixir: "1.18" | |
| otp: "28" | |
| exclude: | |
| - elixir: "1.16" | |
| otp: "27" | |
| - elixir: "1.15" | |
| otp: "27" | |
| - elixir: "1.14" | |
| otp: "27" | |
| runs-on: ubuntu-latest | |
| name: Elixir ${{ matrix.elixir }} / OTP ${{ matrix.otp }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Restore file modification timestamps | |
| uses: chetan/git-restore-mtime-action@v2 | |
| - name: Set up Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ matrix.elixir }} | |
| otp-version: ${{ matrix.otp }} | |
| - name: Cache deps | |
| id: cache-deps | |
| uses: actions/cache@v4 | |
| env: | |
| cache-name: cache-elixir-deps | |
| with: | |
| path: deps | |
| key: ${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-mix-${{ env.cache-name }}- | |
| - name: Cache compiled build | |
| id: cache-build | |
| uses: actions/cache@v4 | |
| env: | |
| cache-name: cache-compiled-build | |
| with: | |
| path: _build | |
| key: ${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-mix-${{ env.cache-name }}- | |
| ${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-mix- | |
| - name: Clean to rule out incremental build as a source of flakiness | |
| if: github.run_attempt != '1' | |
| run: | | |
| mix deps.clean --all | |
| mix clean | |
| shell: sh | |
| - name: Install dependencies | |
| run: mix deps.get | |
| - name: Compiles without warnings | |
| run: mix compile --warnings-as-errors | |
| - name: Check Formatting | |
| run: mix format --check-formatted | |
| - name: Scan Mix dependencies for security vulnerabilities | |
| run: mix deps.audit | |
| - name: Check for retired dependencies | |
| run: mix hex.audit | |
| - name: Check for unused dependencies | |
| run: mix deps.unlock --check-unused | |
| - name: Run Credo | |
| run: mix credo | |
| - name: Run tests | |
| run: mix test | |
| - name: Run Dialyzer | |
| run: mix dialyzer |