Fix constant recompilation issue #8
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: Test | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| repository_dispatch: | |
| jobs: | |
| compile: | |
| runs-on: ubuntu-latest | |
| env: | |
| MIX_ENV: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: erlef/setup-elixir@v1 | |
| with: | |
| version-file: .tool-versions | |
| version-type: strict | |
| - uses: actions/cache/restore@v4 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix- | |
| - run: mix do deps.get, deps.compile | |
| - run: mix compile --warnings-as-errors | |
| - uses: actions/cache/save@v4 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
| formatter: | |
| runs-on: ubuntu-latest | |
| needs: compile | |
| env: | |
| MIX_ENV: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: erlef/setup-elixir@v1 | |
| with: | |
| version-file: .tool-versions | |
| version-type: strict | |
| - uses: actions/cache/restore@v4 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix- | |
| - run: mix format --check-formatted | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: compile | |
| env: | |
| MIX_ENV: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: erlef/setup-elixir@v1 | |
| with: | |
| version-file: .tool-versions | |
| version-type: strict | |
| - uses: actions/cache/restore@v4 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix- | |
| - run: mix test --warnings-as-errors --max-failures 1 --exclude property | |
| unused-deps: | |
| runs-on: ubuntu-latest | |
| needs: compile | |
| env: | |
| MIX_ENV: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: erlef/setup-elixir@v1 | |
| with: | |
| version-file: .tool-versions | |
| version-type: strict | |
| - uses: actions/cache/restore@v4 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix- | |
| - run: mix deps.unlock --check-unused |