diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3798ace4..ddf161a6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,14 +9,12 @@ on: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} MIX_ENV: test - LATEST_ELIXIR: "1.17" - LATEST_OTP: "27.0" jobs: lint: name: Lint - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: fail-fast: true @@ -28,8 +26,8 @@ jobs: - name: Install OTP and Elixir uses: erlef/setup-beam@v1 with: - otp-version: "${{ env.LATEST_OTP }}" - elixir-version: "${{ env.LATEST_ELIXIR }}" + otp-version: "27.0" + elixir-version: "1.17.1" - name: Cache dependencies id: cache-deps @@ -77,44 +75,30 @@ jobs: test: name: >- - Test (Elixir ${{ matrix.elixir }}, - OTP ${{ matrix.otp }}, + Test (Elixir ${{ matrix.runtime.elixir }}, + OTP ${{ matrix.runtime.otp }} — C* ${{ matrix.server_versions.cassandra }}, - Scylla ${{ matrix.server_versions.scylla }} (coverage: ${{ matrix.coverage }}) + Scylla ${{ matrix.server_versions.scylla }}) - runs-on: "${{ matrix.os }}" + runs-on: ubuntu-latest strategy: fail-fast: false matrix: - os: - - ubuntu-latest - otp: - - "25.3" - elixir: - - "1.16" + runtime: + # Oldest supported versions. + - otp: "25.3" + elixir: "1.15.4" + # Latest supported versions. + - otp: "27.0" + elixir: "1.17.1" + server_versions: - cassandra: "3" scylla: "4.6.3" - - include: - - os: ubuntu-latest - otp: "${{ github.env.LATEST_OTP }}" - elixir: "${{ github.env.LATEST_ELIXIR }}" - coverage: true - server_versions: - cassandra: "4.1" - scylla: "5.2" - - # Oldest-supported Elixir and Erlang versions. - - os: ubuntu-latest - otp: "25.3" - elixir: "1.15.4" - coverage: false - server_versions: - cassandra: "4.1" - scylla: "5.2" + - cassandra: "4.1" + scylla: "5.2" env: CASSANDRA_VERSION: ${{ matrix.server_versions.cassandra }} @@ -133,8 +117,8 @@ jobs: - name: Install OTP and Elixir uses: erlef/setup-beam@v1 with: - otp-version: ${{ matrix.otp }} - elixir-version: ${{ matrix.elixir }} + otp-version: ${{ matrix.runtime.otp }} + elixir-version: ${{ matrix.runtime.elixir }} - name: Cache dependencies id: cache-deps @@ -144,21 +128,16 @@ jobs: deps _build key: | - ${{ runner.os }}-mix-otp${{ matrix.otp }}-elixir${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} + ${{ runner.os }}-mix-otp${{ matrix.runtime.otp }}-elixir${{ matrix.runtime.elixir }}-${{ hashFiles('**/mix.lock') }} restore-keys: - ${{ runner.os }}-mix-otp${{ matrix.otp }}-elixir${{ matrix.elixir }}- + ${{ runner.os }}-mix-otp${{ matrix.runtime.otp }}-elixir${{ matrix.runtime.elixir }}- - name: Install and compile dependencies if: steps.cache-deps.outputs.cache-hit != 'true' - run: mix do deps.get --only test + run: mix deps.get --only test # TODO: eventually figure out why we can't run encryption tests on CI. - - name: Run tests for Cassandra and Scylla (with coverage) - if: ${{ matrix.coverage }} - run: mix test.ci_with_coverage --exclude encryption --exclude toxiproxy - - name: Run tests for Cassandra and Scylla (without coverage) - if: ${{ !matrix.coverage }} run: mix test.all --exclude encryption --exclude toxiproxy - name: Dump Docker logs on failure