chore: add crap analysis #42
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: Forum Tests | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: ./forum | |
| on: | |
| pull_request: | |
| paths: | |
| - "forum/**" | |
| - ".github/workflows/forum_tests.yml" | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| MIX_ENV: test | |
| jobs: | |
| tests: | |
| name: Tests & Lint | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup elixir | |
| id: beam | |
| uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # v1.24.0 | |
| with: | |
| otp-version: 27.x # Define the OTP version [required] | |
| elixir-version: 1.18.x # Define the elixir version [required] | |
| - name: Cache Mix | |
| uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 | |
| with: | |
| path: | | |
| forum/deps | |
| forum/_build | |
| key: ${{ github.workflow }}-${{ runner.os }}-mix-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-${{ hashFiles('forum/mix.lock') }} | |
| restore-keys: | | |
| ${{ github.workflow }}-${{ runner.os }}-mix-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}- | |
| - name: Install dependencies | |
| run: mix deps.get | |
| - name: Start epmd | |
| run: epmd -daemon | |
| - name: Run tests | |
| run: MIX_ENV='test' mix test | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Check for warnings | |
| run: mix compile --force --warnings-as-errors | |
| - name: Run format check | |
| run: mix format --check-formatted |