|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +env: |
| 6 | + CC: clang |
| 7 | + CXX: clang++ |
| 8 | + MIX_ENV: test |
| 9 | + WARNINGS_AS_ERRORS: true |
| 10 | + |
| 11 | +jobs: |
| 12 | + test: |
| 13 | + name: Test |
| 14 | + runs-on: ubuntu-latest |
| 15 | + |
| 16 | + strategy: |
| 17 | + fail-fast: false |
| 18 | + matrix: |
| 19 | + include: |
| 20 | + - elixir: 1.18.4 |
| 21 | + otp: 28.0.2 |
| 22 | + rebar3: 3.25.1 |
| 23 | + lint: true |
| 24 | + |
| 25 | + - elixir: 1.18.4 |
| 26 | + otp: 27.3 |
| 27 | + rebar3: 3.25.1 |
| 28 | + |
| 29 | + steps: |
| 30 | + - uses: actions/checkout@v5 |
| 31 | + |
| 32 | + - name: Setup Beam |
| 33 | + uses: erlef/setup-beam@v1 |
| 34 | + with: |
| 35 | + elixir-version: ${{ matrix.elixir }} |
| 36 | + otp-version: ${{ matrix.otp }} |
| 37 | + rebar3-version: ${{ matrix.rebar3 }} |
| 38 | + |
| 39 | + # - name: (Erlang) Check Formatting |
| 40 | + # if: ${{ matrix.lint }} |
| 41 | + # run: | |
| 42 | + # clang-format --version |
| 43 | + # make lint-format |
| 44 | + |
| 45 | + # - name: (Erlang) eqWAlizer |
| 46 | + # if: ${{ matrix.lint }} |
| 47 | + # run: make lint-eqwalizer |
| 48 | + |
| 49 | + # - name: (Erlang) Dialyzer |
| 50 | + # if: ${{ matrix.lint }} |
| 51 | + # run: make lint-dialyzer |
| 52 | + |
| 53 | + # - name: (Erlang) Xref |
| 54 | + # if: ${{ matrix.lint }} |
| 55 | + # run: make lint-xref |
| 56 | + |
| 57 | + - name: (Erlang) Tests |
| 58 | + run: | |
| 59 | + rebar3 ct |
| 60 | +
|
| 61 | + # - name: (Elixir) Retrieve Mix Dependencies Cache |
| 62 | + # uses: actions/cache@v4 |
| 63 | + # id: mix-cache |
| 64 | + # with: |
| 65 | + # path: deps |
| 66 | + # key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} |
| 67 | + |
| 68 | + # - name: (Elixir) Install Mix Dependencies |
| 69 | + # if: steps.mix-cache.outputs.cache-hit != 'true' |
| 70 | + # run: | |
| 71 | + # mix local.rebar --force |
| 72 | + # mix local.hex --force |
| 73 | + # mix deps.get |
| 74 | + |
| 75 | + # - name: (Elixir) Check Formatting |
| 76 | + # if: ${{ matrix.lint }} |
| 77 | + # run: mix format --check-formatted |
| 78 | + |
| 79 | + # - name: (Elixir) Tests |
| 80 | + # run: mix test --trace |
| 81 | + |
| 82 | + - name: Logs |
| 83 | + uses: actions/upload-artifact@v4 |
| 84 | + if: failure() |
| 85 | + with: |
| 86 | + name: ct-logs-${{ matrix.otp }}-${{ matrix.elixir }} |
| 87 | + path: _build/test/logs/ |
0 commit comments