feat: mix excessibility.review — accessibility blast-radius report #173
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] | |
| jobs: | |
| test: | |
| name: Test (Elixir ${{ matrix.elixir }} / OTP ${{ matrix.otp }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| elixir: ['1.18', '1.19'] | |
| otp: ['26', '27'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ matrix.elixir }} | |
| otp-version: ${{ matrix.otp }} | |
| install-rebar: true | |
| install-hex: true | |
| - name: Restore dependencies cache | |
| uses: actions/cache@v4 | |
| id: cache-deps | |
| with: | |
| path: | | |
| deps | |
| _build | |
| ~/.hex | |
| ~/.mix | |
| key: ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('**/mix.lock') }}-${{ hashFiles('lib/**/*.ex') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('**/mix.lock') }}- | |
| - name: Install dependencies | |
| if: steps.cache-deps.outputs.cache-hit != 'true' | |
| run: mix deps.get | |
| - name: Compile dependencies | |
| if: steps.cache-deps.outputs.cache-hit != 'true' | |
| run: mix deps.compile | |
| - name: Check for unused dependencies | |
| if: matrix.elixir == '1.19' | |
| run: mix deps.unlock --check-unused | |
| - name: Check code formatting | |
| if: matrix.elixir == '1.19' | |
| run: mix format --check-formatted | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install npm dependencies and Playwright | |
| run: | | |
| cd assets && npm install | |
| npx playwright install chromium --with-deps | |
| - name: Compile with warnings as errors | |
| run: mix compile --warnings-as-errors | |
| env: | |
| MIX_ENV: test | |
| - name: Run Credo | |
| if: matrix.elixir == '1.19' | |
| run: mix credo --strict | |
| - name: Run tests | |
| run: mix test | |
| - name: Build documentation | |
| if: matrix.elixir == '1.19' | |
| run: mix docs |