Tweaks and adjustments to modernize this repo #56
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 | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| MIX_ENV: test | |
| strategy: | |
| matrix: | |
| elixir: [1.18.4] | |
| otp: [28.0.2] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: System Dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y inotify-tools | |
| - name: Setup Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: ${{ matrix.otp }} | |
| elixir-version: ${{ matrix.elixir }} | |
| - name: Restore dependencies cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: mix-${{ runner.os }}-${{matrix.elixir}}-${{matrix.otp}}-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| mix-${{ runner.os }}-${{matrix.elixir}}-${{matrix.otp}}- | |
| - name: Install dependencies | |
| run: mix deps.get | |
| - name: Check code format | |
| run: mix format --check-formatted | |
| - name: Run static analysis | |
| run: mix credo --strict | |
| - name: Check for unneeded dependencies | |
| run: mix deps.unlock --check-unused | |
| - name: Run tests | |
| run: mix test |