ST0009: core impl #30
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: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| env: | |
| MIX_ENV: test | |
| TERM: xterm | |
| ARCA_CLI_CONFIG_PATH: .arca_cli | |
| ARCA_CLI_CONFIG_FILE: config.json | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: '1.18' | |
| otp-version: '27' | |
| - name: Restore dependencies cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: deps | |
| key: ${{ runner.os }}-mix-deps-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix-deps- | |
| - name: Restore build cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: _build | |
| key: ${{ runner.os }}-mix-build-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix-build- | |
| - name: Install dependencies | |
| run: | | |
| mix local.hex --force | |
| mix local.rebar --force | |
| mix deps.get | |
| - name: Check for unused dependencies | |
| run: mix deps.unlock --check-unused | |
| - name: Compile with warnings as errors | |
| run: mix compile --warnings-as-errors --force | |
| - name: Check formatting | |
| run: mix format --check-formatted | |
| - name: Run tests | |
| run: mix test |