From 624930c42595b491c60772d9e2f1ce0e1155fc17 Mon Sep 17 00:00:00 2001 From: Ayan Khan Date: Wed, 27 Dec 2023 15:22:47 -0500 Subject: [PATCH] simplify ci build for aerospike (#3886) * simplify ci build for aerospike --- .github/workflows/plugins.yml | 55 +++++++++++++++-------------------- 1 file changed, 24 insertions(+), 31 deletions(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index 59f2dcd3934..7c6f1f10280 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -59,11 +59,7 @@ jobs: majorVersion=$(echo "$version" | cut -d '.' -f 1) echo "Major Version: $majorVersion" echo "MAJOR_VERSION=$majorVersion" >> $GITHUB_ENV - - name: Check package version - if: env.MAJOR_VERSION == '3' - run: | - echo "Package version is 3. Proceeding with the next steps." - - name: Install dependencies + - name: Install dependencies and run tests if: env.MAJOR_VERSION == '3' run: | apt-get update && \ @@ -72,14 +68,11 @@ jobs: wget \ g++ libssl1.0.0 libssl-dev zlib1g-dev && \ npm install -g yarn - - if: env.MAJOR_VERSION == '3' - run: yarn install --ignore-engines - - if: env.MAJOR_VERSION == '3' - uses: ./.github/actions/node/14 - - if: env.MAJOR_VERSION == '3' - run: yarn test:plugins:ci - - if: env.MAJOR_VERSION == '3' + yarn install --ignore-engines + yarn test:plugins:ci + - if: always() uses: codecov/codecov-action@v2 + aerospike-4: runs-on: ubuntu-latest services: @@ -101,7 +94,15 @@ jobs: - if: always() uses: ./.github/actions/testagent/logs - uses: codecov/codecov-action@v2 + aerospike-5: + strategy: + matrix: + node-version: [16] + range: ['5.5.0 - 5.7.0'] + include: + - node-version: 20 + range: '>=5.8.0' runs-on: ubuntu-latest services: aerospike: @@ -111,7 +112,7 @@ jobs: env: PLUGINS: aerospike SERVICES: aerospike - PACKAGE_VERSION_RANGE: '5.5.0 - 5.7.0' + PACKAGE_VERSION_RANGE: ${{ matrix.range }} steps: - uses: actions/checkout@v2 - uses: ./.github/actions/testagent/start @@ -126,26 +127,18 @@ jobs: majorVersion=$(echo "$version" | cut -d '.' -f 1) echo "Major Version: $majorVersion" echo "MAJOR_VERSION=$majorVersion" >> $GITHUB_ENV - - name: Check package version + - uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - name: Install dependencies and run tests if: env.MAJOR_VERSION != '3' run: | - echo "Package version is not 3. Proceeding with the next steps." - - if: env.MAJOR_VERSION != '3' - run: yarn install --ignore-engines - - if: env.MAJOR_VERSION != '3' - uses: ./.github/actions/node/oldest - - if: env.MAJOR_VERSION != '3' - run: yarn test:plugins:ci - - if: env.MAJOR_VERSION != '3' - run: echo "PACKAGE_VERSION_RANGE=>=5.8.0" >> "$GITHUB_ENV" - - if: env.MAJOR_VERSION != '3' - uses: ./.github/actions/node/20 # currently the latest version of aerospike only supports node 20 - - if: env.MAJOR_VERSION != '3' - run: yarn test:plugins:ci - - if: env.MAJOR_VERSION != '3' + yarn install --ignore-engines + yarn test:plugins:ci + - if: always() uses: ./.github/actions/testagent/logs - - if: env.MAJOR_VERSION != '3' - uses: codecov/codecov-action@v2 + - uses: codecov/codecov-action@v2 + amqp10: # TODO: move rhea to its own job runs-on: ubuntu-latest services: @@ -1247,4 +1240,4 @@ jobs: - uses: ./.github/actions/node/latest - run: yarn test:plugins:ci - if: always() - uses: ./.github/actions/testagent/logs + uses: ./.github/actions/testagent/logs \ No newline at end of file