Skip to content

Commit

Permalink
ci(acctests): run for v4 branch (#1413)
Browse files Browse the repository at this point in the history
  • Loading branch information
Serpentiel authored Oct 26, 2023
1 parent 3b146b0 commit 99a360e
Show file tree
Hide file tree
Showing 9 changed files with 143 additions and 2 deletions.
118 changes: 118 additions & 0 deletions .github/workflows/acceptance-tests-v4.yml
Original file line number Diff line number Diff line change
@@ -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 }}
9 changes: 7 additions & 2 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:

Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions .github/workflows/examples-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,17 @@ 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:
runs-on: ubuntu-latest
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
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/sweep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 99a360e

Please sign in to comment.