feat(redis): add redix_opts for SSL/TLS support #137
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: ci | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| env: | |
| MIX_ENV: test | |
| strategy: | |
| matrix: | |
| include: | |
| - elixir: 1.18 | |
| otp: 28 | |
| - elixir: 1.18 | |
| otp: 27 | |
| - elixir: 1.18 | |
| otp: 26 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ matrix.elixir }} | |
| otp-version: ${{ matrix.otp }} | |
| - name: Cache Elixir deps | |
| uses: actions/cache@v4 | |
| id: deps-cache | |
| with: | |
| path: deps | |
| key: ${{ runner.os }}-mix-${{ env.MIX_ENV }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
| - name: Cache Elixir _build | |
| uses: actions/cache@v4 | |
| id: build-cache | |
| with: | |
| path: _build | |
| key: ${{ runner.os }}-build-${{ env.MIX_ENV }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
| - name: Install deps | |
| if: steps.deps-cache.outputs.cache-hit != 'true' | |
| run: | | |
| mix local.rebar --force | |
| mix local.hex --force | |
| mix deps.get --only ${{ env.MIX_ENV }} | |
| - name: Compile deps | |
| if: steps.build-cache.outputs.cache-hit != 'true' | |
| run: mix deps.compile --warnings-as-errors | |
| - name: Check code formatting | |
| run: mix format --check-formatted | |
| - name: Run Credo | |
| run: mix credo --strict | |
| static-analysis: | |
| runs-on: ubuntu-latest | |
| env: | |
| MIX_ENV: test | |
| strategy: | |
| matrix: | |
| include: | |
| - elixir: 1.18 | |
| otp: 28 | |
| - elixir: 1.18 | |
| otp: 27 | |
| - elixir: 1.18 | |
| otp: 26 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ matrix.elixir }} | |
| otp-version: ${{ matrix.otp }} | |
| - name: Cache Elixir deps | |
| uses: actions/cache@v4 | |
| id: deps-cache | |
| with: | |
| path: deps | |
| key: ${{ runner.os }}-mix-${{ env.MIX_ENV }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
| - name: Cache Elixir _build | |
| uses: actions/cache@v4 | |
| id: build-cache | |
| with: | |
| path: _build | |
| key: ${{ runner.os }}-build-${{ env.MIX_ENV }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
| - name: Install deps | |
| if: steps.deps-cache.outputs.cache-hit != 'true' | |
| run: | | |
| mix local.rebar --force | |
| mix local.hex --force | |
| mix deps.get --only ${{ env.MIX_ENV }} | |
| - name: Compile deps | |
| if: steps.build-cache.outputs.cache-hit != 'true' | |
| run: mix deps.compile --warnings-as-errors | |
| # Ensure PLTs directory exists | |
| - name: Create PLTs directory | |
| run: mkdir -p priv/plts | |
| # Cache PLTs based on Elixir & Erlang version + mix.lock hash | |
| - name: Restore/Save PLT cache | |
| uses: actions/cache@v4 | |
| id: plt_cache | |
| with: | |
| path: priv/plts | |
| key: plt-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }} | |
| restore-keys: | | |
| plt-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}- | |
| # Create PLTs if no cache was found | |
| - name: Create PLTs | |
| if: steps.plt_cache.outputs.cache-hit != 'true' | |
| run: mix dialyzer --plt | |
| - name: Run dialyzer | |
| run: mix dialyzer --format github | |
| test: | |
| runs-on: ubuntu-latest | |
| env: | |
| MIX_ENV: test | |
| services: | |
| redis: | |
| image: redis:7-alpine | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 6379:6379 | |
| strategy: | |
| matrix: | |
| include: | |
| - elixir: 1.18 | |
| otp: 28 | |
| - elixir: 1.18 | |
| otp: 27 | |
| - elixir: 1.18 | |
| otp: 26 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ matrix.elixir }} | |
| otp-version: ${{ matrix.otp }} | |
| - name: Cache Elixir deps | |
| uses: actions/cache@v4 | |
| id: deps-cache | |
| with: | |
| path: deps | |
| key: ${{ runner.os }}-mix-${{ env.MIX_ENV }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
| - name: Cache Elixir _build | |
| uses: actions/cache@v4 | |
| id: build-cache | |
| with: | |
| path: _build | |
| key: ${{ runner.os }}-build-${{ env.MIX_ENV }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
| - name: Install deps | |
| if: steps.deps-cache.outputs.cache-hit != 'true' | |
| run: | | |
| mix local.rebar --force | |
| mix local.hex --force | |
| mix deps.get --only ${{ env.MIX_ENV }} | |
| - name: Compile deps | |
| if: steps.build-cache.outputs.cache-hit != 'true' | |
| run: mix deps.compile --warnings-as-errors | |
| - name: Run tests | |
| run: mix test --include integration |