From 6c9f4cac6ee505c242d972461d3745b1e60eda39 Mon Sep 17 00:00:00 2001 From: Ronald Ekambi Date: Tue, 7 Nov 2023 09:58:21 -0500 Subject: [PATCH 1/3] [NET-5823] Add consul enterprise tests run --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d28b6b369..de6b2ab25 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,17 +1,26 @@ name: ci on: - push: pull_request: + push: + branches: + - main + - release/** + +env: + CONSUL_LICENSE: ${{ secrets.CONSUL_LICENSE }} jobs: run-tests: - name: Run test cases + name: Run test cases (consul-version=${{ matrix.consul-version }}) runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest] go: [^1] + consul-version: + - 1.17.0 + - 1.17.0+ent steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 @@ -20,12 +29,22 @@ jobs: uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: go-version: ${{ matrix.go }} + + - name: Install Consul (consul-version=${{ matrix.consul-version }}) for integration testing + shell: bash + run: | + CONSUL_VERSION="${{ matrix.consul-version }}" + FILENAME="consul_${CONSUL_VERSION}_linux_amd64.zip" + curl -sSLO "https://releases.hashicorp.com/consul/${CONSUL_VERSION}/${FILENAME}" && \ + unzip "${FILENAME}" -d /usr/local/bin && \ + rm "${FILENAME}" + consul version - - name: Install Consul, Vault and Nomad for integration testing + - name: Install Vault and Nomad for integration testing run: | curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" - sudo apt-get update && sudo apt-get install consul vault nomad + sudo apt-get update && sudo apt-get install vault nomad - name: Run tests run: | From bc27a1031d44555c372def54f62050880df6a5e0 Mon Sep 17 00:00:00 2001 From: Ronald Ekambi Date: Tue, 14 Nov 2023 13:11:54 -0500 Subject: [PATCH 2/3] consul ent latest --- .github/workflows/ci.yml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de6b2ab25..f6b7eaf65 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,9 +18,7 @@ jobs: matrix: os: [ubuntu-latest] go: [^1] - consul-version: - - 1.17.0 - - 1.17.0+ent + consul-version: ["", "-enterprise"] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 @@ -29,22 +27,12 @@ jobs: uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: go-version: ${{ matrix.go }} - - - name: Install Consul (consul-version=${{ matrix.consul-version }}) for integration testing - shell: bash - run: | - CONSUL_VERSION="${{ matrix.consul-version }}" - FILENAME="consul_${CONSUL_VERSION}_linux_amd64.zip" - curl -sSLO "https://releases.hashicorp.com/consul/${CONSUL_VERSION}/${FILENAME}" && \ - unzip "${FILENAME}" -d /usr/local/bin && \ - rm "${FILENAME}" - consul version - - name: Install Vault and Nomad for integration testing + - name: Install Consul${{ matrix.consul-version }}, Vault and Nomad for integration testing run: | curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" - sudo apt-get update && sudo apt-get install vault nomad + sudo apt-get update && sudo apt-get install consul${{ matrix.consul-version }} vault nomad - name: Run tests run: | From bcb982f086c3121ab7cc2467ef469b07ef5b4537 Mon Sep 17 00:00:00 2001 From: Ronald Ekambi Date: Tue, 14 Nov 2023 13:26:03 -0500 Subject: [PATCH 3/3] rename consul steps --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6b7eaf65..0abb9b5aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,13 +12,13 @@ env: jobs: run-tests: - name: Run test cases (consul-version=${{ matrix.consul-version }}) + name: Run test cases (with consul${{ matrix.consul-ent-tag }}) runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest] go: [^1] - consul-version: ["", "-enterprise"] + consul-ent-tag: ["", "-enterprise"] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 @@ -28,11 +28,11 @@ jobs: with: go-version: ${{ matrix.go }} - - name: Install Consul${{ matrix.consul-version }}, Vault and Nomad for integration testing + - name: Install Consul${{ matrix.consul-ent-tag }}, Vault and Nomad for integration testing run: | curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" - sudo apt-get update && sudo apt-get install consul${{ matrix.consul-version }} vault nomad + sudo apt-get update && sudo apt-get install consul${{ matrix.consul-ent-tag }} vault nomad - name: Run tests run: |