From 99a360e6c52b382d8e0e50f31d28da271353fc43 Mon Sep 17 00:00:00 2001 From: Aleksander Zaruczewski Date: Thu, 26 Oct 2023 03:32:31 -0400 Subject: [PATCH] ci(acctests): run for v4 branch (#1413) --- .github/workflows/acceptance-tests-v4.yml | 118 ++++++++++++++++++++++ .github/workflows/acceptance-tests.yml | 9 +- .github/workflows/codeql.yml | 2 + .github/workflows/dependency-review.yml | 2 + .github/workflows/examples-tests.yml | 2 + .github/workflows/lint.yml | 6 ++ .github/workflows/release-artifacts.yml | 2 + .github/workflows/sweep.yml | 2 + .github/workflows/unit-tests.yml | 2 + 9 files changed, 143 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/acceptance-tests-v4.yml diff --git a/.github/workflows/acceptance-tests-v4.yml b/.github/workflows/acceptance-tests-v4.yml new file mode 100644 index 000000000..56c38227a --- /dev/null +++ b/.github/workflows/acceptance-tests-v4.yml @@ -0,0 +1,118 @@ +name: Acceptance Tests (v4) + +on: + schedule: + - cron: "0 3 * * *" + +permissions: + contents: read + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + acceptance_tests: + runs-on: ubuntu-latest + + strategy: + max-parallel: 5 + fail-fast: false + matrix: + pkg: [ + kafka, + kafkatopic, + kafkaschema, + account, + cassandra, + clickhouse, + connectionpool, + flink, + pg, + grafana, + influxdb, + m3db, + mysql, + opensearch, + organization, + project, + redis, + servicecomponent, + staticip, + serviceintegration, + vpc + ] + + steps: + - uses: softprops/turnstyle@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + same-branch-only: true + + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: v4 + - uses: actions/setup-go@v4 + with: + go-version-file: go.mod + + - uses: actions/cache@v3 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - run: make test-acc + env: + AIVEN_TOKEN: ${{ secrets.AIVEN_TOKEN }} + AIVEN_PROJECT_NAME: ${{ secrets.AIVEN_PROJECT_NAME }} + AIVEN_ORGANIZATION_NAME: ${{ secrets.AIVEN_ORGANIZATION_NAME }} + AIVEN_ACCOUNT_NAME: ${{ secrets.AIVEN_ORGANIZATION_NAME }} + PKG: ${{ matrix.pkg }} + + sweep: + if: always() + needs: acceptance_tests + + runs-on: ubuntu-latest + steps: + + - uses: softprops/turnstyle@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + same-branch-only: true + + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: v4 + - uses: actions/setup-go@v4 + with: + go-version-file: go.mod + + - uses: actions/cache@v3 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - uses: nick-invision/retry@v2 + if: always() + with: + timeout_minutes: 15 + max_attempts: 15 + command: make sweep + env: + AIVEN_TOKEN: ${{ secrets.AIVEN_TOKEN }} + AIVEN_PROJECT_NAME: ${{ secrets.AIVEN_PROJECT_NAME }} + AIVEN_ORGANIZATION_NAME: ${{ secrets.AIVEN_ORGANIZATION_NAME }} + AIVEN_ACCOUNT_NAME: ${{ secrets.AIVEN_ORGANIZATION_NAME }} diff --git a/.github/workflows/acceptance-tests.yml b/.github/workflows/acceptance-tests.yml index c1ce5db57..cfe94d0b7 100644 --- a/.github/workflows/acceptance-tests.yml +++ b/.github/workflows/acceptance-tests.yml @@ -52,6 +52,8 @@ jobs: same-branch-only: true - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions/setup-go@v4 with: go-version-file: go.mod @@ -71,11 +73,12 @@ jobs: AIVEN_PROJECT_NAME: ${{ secrets.AIVEN_PROJECT_NAME }} AIVEN_ORGANIZATION_NAME: ${{ secrets.AIVEN_ORGANIZATION_NAME }} AIVEN_ACCOUNT_NAME: ${{ secrets.AIVEN_ORGANIZATION_NAME }} - PKG: ${{matrix.pkg}} + PKG: ${{ matrix.pkg }} sweep: - if: ${{ always() }} + if: always() needs: acceptance_tests + runs-on: ubuntu-latest steps: @@ -86,6 +89,8 @@ jobs: same-branch-only: true - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions/setup-go@v4 with: go-version-file: go.mod diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index c91d9953a..5950dea23 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -32,6 +32,8 @@ jobs: - go steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions/setup-go@v4 with: go-version-file: go.mod diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index f88df9fa4..cb9e79f5e 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -27,4 +27,6 @@ jobs: if: (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip workflows')) || github.event_name == 'push' steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions/dependency-review-action@v3 diff --git a/.github/workflows/examples-tests.yml b/.github/workflows/examples-tests.yml index 8835294e5..c00e728f7 100644 --- a/.github/workflows/examples-tests.yml +++ b/.github/workflows/examples-tests.yml @@ -23,6 +23,8 @@ jobs: same-branch-only: true - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions/setup-go@v4 with: go-version-file: go.mod diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3df22cedb..a3640952e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -33,6 +33,8 @@ jobs: if: (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip workflows')) || github.event_name == 'push' steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: returntocorp/semgrep-action@v1 make_lint: @@ -40,6 +42,8 @@ jobs: if: (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip workflows')) || github.event_name == 'push' steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions/setup-go@v4 with: go-version-file: go.mod @@ -51,6 +55,8 @@ jobs: if: (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip workflows')) || github.event_name == 'push' steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions/setup-go@v4 with: go-version-file: go.mod diff --git a/.github/workflows/release-artifacts.yml b/.github/workflows/release-artifacts.yml index 733ec08c9..9a5cb1095 100644 --- a/.github/workflows/release-artifacts.yml +++ b/.github/workflows/release-artifacts.yml @@ -11,6 +11,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions/setup-go@v4 with: go-version-file: go.mod diff --git a/.github/workflows/sweep.yml b/.github/workflows/sweep.yml index 14e9d239d..63669c918 100644 --- a/.github/workflows/sweep.yml +++ b/.github/workflows/sweep.yml @@ -18,6 +18,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions/setup-go@v4 with: go-version-file: go.mod diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 4e5972f29..8a80f9198 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -25,6 +25,8 @@ jobs: if: (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip workflows')) || github.event_name == 'push' steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions/setup-go@v4 with: go-version-file: go.mod