Refactor Codebase #71
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 | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build & Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: "1.19.4" | |
| otp-version: "28.3" | |
| - name: Cache dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: deps | |
| key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: ${{ runner.os }}-mix- | |
| - name: Cache build | |
| uses: actions/cache@v3 | |
| with: | |
| path: _build | |
| key: ${{ runner.os }}-build-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: ${{ runner.os }}-build- | |
| - name: Install dependencies | |
| run: mix deps.get | |
| - name: Check code formatting | |
| run: mix format --check-formatted | |
| - name: Compile dependencies | |
| run: mix deps.compile | |
| - name: Run Credo (static analysis) | |
| run: mix credo --strict | |
| - name: Run Dialyzer (type checking) | |
| run: mix dialyzer | |
| - name: Run tests | |
| run: mix test |