release 1.12.1 #159
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| schedule: | |
| - cron: "0 0 1 */1 *" | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Elixir ${{ matrix.pair.elixir }} / OTP ${{ matrix.pair.otp }} / NATS ${{ matrix.pair.nats }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| pair: | |
| - otp: "25" | |
| elixir: "1.14" | |
| nats: "2.10.0" | |
| - otp: "26" | |
| elixir: "1.16" | |
| nats: "2.10.24" | |
| - otp: "27" | |
| elixir: "1.17" | |
| nats: "2.10.24" | |
| - otp: "27" | |
| elixir: "1.18" | |
| nats: "2.10.24" | |
| - otp: "28" | |
| elixir: "1.18" | |
| nats: "2.11.11" | |
| - otp: "28" | |
| elixir: "1.18" | |
| nats: "2.10.24" | |
| # the main pair handles things like format checking and running dialyzer | |
| - main: true | |
| otp: "28" | |
| elixir: "1.19" | |
| nats: "2.10.24" | |
| env: | |
| MIX_ENV: test | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ matrix.pair.elixir }} | |
| otp-version: ${{ matrix.pair.otp }} | |
| - name: Start NATS Jetstream | |
| run: docker run --rm -d --network host nats:${{ matrix.pair.nats }} -js | |
| - name: Restore deps cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: deps-${{ matrix.pair.otp }}-${{ matrix.pair.elixir }}-${{ hashFiles('mix.lock') }} | |
| - name: Install package dependencies | |
| run: mix deps.get | |
| - name: Check for valid formatting | |
| if: matrix.pair.main | |
| run: mix format --check-formatted | |
| - name: Run unit tests | |
| run: mix test --color | |
| - name: Run NATS 2.11 specific tests | |
| if: ${{ matrix.pair.nats == '2.11.11' }} | |
| run: mix test --only message_ttl | |
| - name: Cache Dialyzer PLTs | |
| if: matrix.pair.main | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| priv/plts/*.plt | |
| priv/plts/*.plt.hash | |
| key: dialyzer-${{ matrix.pair.otp }}-${{ matrix.pair.elixir }}-${{ hashFiles('mix.lock') }} | |
| restore-keys: | | |
| dialyzer-${{ matrix.pair.otp }}-${{ matrix.pair.elixir }}- | |
| - name: Run Dialyzer | |
| if: matrix.pair.main | |
| env: | |
| MIX_ENV: dev | |
| run: | | |
| mix dialyzer |