claude watcher docs #44
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, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| test: | |
| name: Build and test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| elixir-version: [1.18.3] | |
| otp-version: [27.3.3] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ matrix.elixir-version }} | |
| otp-version: ${{ matrix.otp-version }} | |
| - name: Restore dependencies cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: deps | |
| key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: ${{ runner.os }}-mix- | |
| - name: Restore compiled code cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: _build | |
| key: ${{ runner.os }}-build-${{ matrix.otp-version }}-${{ matrix.elixir-version }}-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-build-${{ matrix.otp-version }}-${{ matrix.elixir-version }}- | |
| - name: Install dependencies | |
| run: mix deps.get | |
| - name: Compile project | |
| run: mix compile --warnings-as-errors | |
| - name: Check formatting | |
| run: mix format --check-formatted | |
| - name: Run Credo (excluding refactoring opportunities) | |
| run: ./scripts/credo_ci.sh | |
| - name: Run tests | |
| run: mix test | |
| env: | |
| SHELL: /bin/bash | |
| MIX_ENV: test | |
| - name: Restore PLT cache | |
| uses: actions/cache@v3 | |
| id: plt_cache | |
| with: | |
| key: | | |
| ${{ runner.os }}-${{ matrix.elixir-version }}-${{ matrix.otp-version }}-plt | |
| restore-keys: | | |
| ${{ runner.os }}-${{ matrix.elixir-version }}-${{ matrix.otp-version }}-plt | |
| path: | | |
| priv/plts | |
| - name: Create PLTs | |
| if: steps.plt_cache.outputs.cache-hit != 'true' | |
| run: mix dialyzer --plt | |
| - name: Run dialyzer | |
| run: mix dialyzer --format github |