docs: update #14
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] | |
| jobs: | |
| test: | |
| name: Build and test | |
| runs-on: ubuntu-latest | |
| env: | |
| MIX_ENV: test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| elixir: ["1.16"] | |
| otp: ["26.2.5"] | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Install Erlang/OTP and Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: ${{ matrix.otp }} | |
| elixir-version: ${{ matrix.elixir }} | |
| version-type: strict | |
| - name: Cache Mix dependencies | |
| uses: actions/cache@v4 | |
| id: cache-deps | |
| env: | |
| cache-name: cache-elixir-deps | |
| with: | |
| path: deps | |
| key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: ${{ runner.os }}-mix-${{ env.cache-name }}- | |
| - name: Cache compiled build | |
| uses: actions/cache@v4 | |
| id: cache-build | |
| env: | |
| cache-name: cache-elixir-build | |
| with: | |
| path: _build | |
| key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix-${{ env.cache-name }}- | |
| ${{ runner.os }}-mix- | |
| - name: Install dependencies | |
| run: mix deps.get --check-locked | |
| - name: Check formatting | |
| run: mix format --check-formatted | |
| - name: Check for unused dependencies | |
| run: mix deps.unlock --check-unused | |
| - name: Check for compilation warnings | |
| run: mix compile --warnings-as-errors | |
| - name: Run credo checks | |
| run: mix credo --strict | |
| - name: Run tests | |
| run: mix test |