Skip to content

Acceptance Tests

Acceptance Tests #1260

name: Acceptance Tests
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
setup_aiven_project:
runs-on: ubuntu-latest
outputs:
project_name: ${{ steps.selproj.outputs.project_name }}
steps:
- uses: actions/checkout@v4
- id: selproj
run: |
selproj_out=$(make ci-selproj | tail -n 1)
echo "project_name<<EOF" >> $GITHUB_OUTPUT
echo "$selproj_out" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
env:
AIVEN_TOKEN: ${{ secrets.AIVEN_TOKEN }}
AIVEN_PROJECT_NAME_PREFIX: ${{ secrets.AIVEN_PROJECT_NAME_PREFIX }}
acceptance_tests:
needs: setup_aiven_project
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
- uses: actions/setup-go@v5
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: ${{ needs.setup_aiven_project.outputs.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, setup_aiven_project]
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
- uses: actions/setup-go@v5
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: ${{ needs.setup_aiven_project.outputs.project_name }}
AIVEN_ORGANIZATION_NAME: ${{ secrets.AIVEN_ORGANIZATION_NAME }}
AIVEN_ACCOUNT_NAME: ${{ secrets.AIVEN_ORGANIZATION_NAME }}