From 2907dbf1013a8288a1068826c7ed2cf7cc1dae90 Mon Sep 17 00:00:00 2001 From: Watson Date: Sun, 4 Feb 2024 08:06:16 +0900 Subject: [PATCH] CI: Use matrix to delect using cassandra version (#8) --- .github/workflows/CI.yml | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 68f7002..f4a3169 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -13,43 +13,20 @@ env: TESTOPTS: --verbose jobs: - test-linux-cassandra4: + test-linux-cassandra: runs-on: ubuntu-latest timeout-minutes: 10 strategy: matrix: ruby-version: ['3.0', '3.1', '3.2', '3.3'] + cassandra-version: ['3', '4', '5'] - name: Linux, Cassandra 4, Ruby ${{ matrix.ruby-version }} + name: Linux, Cassandra ${{ matrix.cassandra-version }}, Ruby ${{ matrix.ruby-version }} steps: - - name: Start Cassandra v4 - run: | - docker run --name cassandra -d -p 9042:9042 cassandra:4 - - uses: actions/checkout@v4 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby-version }} - bundler-cache: true - - name: Prepare tests - run: bundle exec rake compile - - name: Run tests - run: bundle exec rake test - - test-linux-cassandra3: - runs-on: ubuntu-latest - timeout-minutes: 10 - - strategy: - matrix: - ruby-version: ['3.0', '3.1', '3.2', '3.3'] - - name: Linux, Cassandra 3, Ruby ${{ matrix.ruby-version }} - steps: - - name: Start Cassandra v3 + - name: Start Cassandra v${{ matrix.cassandra-version }} run: | - docker run --name cassandra -d -p 9042:9042 cassandra:3 + docker run --name cassandra -d -p 9042:9042 cassandra:${{ matrix.cassandra-version }} - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1