fix(ci): run quality job in dev env so dialyzer is available #2
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| MIX_ENV: test | |
| ELIXIR_VERSION: "1.17.3" | |
| OTP_VERSION: "27.1.1" | |
| jobs: | |
| test: | |
| name: Test & Coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ env.ELIXIR_VERSION }} | |
| otp-version: ${{ env.OTP_VERSION }} | |
| - name: Cache deps | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-mix-${{ hashFiles('mix.lock') }} | |
| restore-keys: ${{ runner.os }}-mix- | |
| - name: Install dependencies | |
| run: mix deps.get | |
| - name: Compile (warnings as errors) | |
| run: mix compile --warnings-as-errors | |
| - name: Run tests with coverage | |
| run: mix coveralls.github | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| quality: | |
| name: Code Quality | |
| runs-on: ubuntu-latest | |
| env: | |
| MIX_ENV: dev | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ env.ELIXIR_VERSION }} | |
| otp-version: ${{ env.OTP_VERSION }} | |
| - name: Cache deps | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-mix-dev-${{ hashFiles('mix.lock') }} | |
| restore-keys: ${{ runner.os }}-mix-dev- | |
| - name: Install dependencies | |
| run: mix deps.get | |
| - name: Check formatting | |
| run: mix format --check-formatted | |
| - name: Credo | |
| run: mix credo --strict | |
| - name: Cache PLT | |
| uses: actions/cache@v4 | |
| with: | |
| path: _build/dev/dialyxir_*.plt | |
| key: ${{ runner.os }}-plt-${{ hashFiles('mix.lock') }} | |
| restore-keys: ${{ runner.os }}-plt- | |
| - name: Dialyzer | |
| run: mix dialyzer |