Skip to content

Commit

Permalink
feat(github): test tablets in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal-Leszczynski committed Mar 11, 2024
1 parent bf0fb40 commit afe90d8
Show file tree
Hide file tree
Showing 2 changed files with 145 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/actions/test-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ inputs:
raft-enabled:
description: "Specifies if cluster should use consistent_cluster_management option"
required: false
tablets:
description: "Specifies if cluster should use tablets replication"
required: false
start-dev-env:
description: "Should this action run 'make start-dev-env'"
required: false
Expand Down Expand Up @@ -39,5 +42,5 @@ runs:

- name: Start dev env
if: inputs.start-dev-env == 'true'
run: make start-dev-env SCYLLA_VERSION=${{ inputs.scylla-version }} IP_FAMILY=${{ inputs.ip-family }} RAFT_ENABLED=${{ inputs.raft-enabled }}
run: make start-dev-env SCYLLA_VERSION=${{ inputs.scylla-version }} IP_FAMILY=${{ inputs.ip-family }} RAFT_ENABLED=${{ inputs.raft-enabled }} TABLETS=${{ inputs.tablets }}
shell: bash
141 changes: 141 additions & 0 deletions .github/workflows/integration-tests-nightly-latest-ipv4-tablets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
name: Integration tests (Scylla Nightly latest, IPV4, tablets)

on:
push:
branches:
- master
pull_request:
types: [ opened, synchronize, reopened ]

concurrency:
group: int-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
scylla-version: 'scylla-nightly:latest'
ip-family: IPV4
raft-enabled: true
tablets: true

jobs:
# Right now both restore-tables and restore-schema tests take way longer than any other pkg tests.
# For this reason they are divided into two distinct jobs, so that the whole workflow can be executed faster.
restore-tables:
name: Test restore tables
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Setup testing dependencies
uses: ./.github/actions/test-setup
with:
scylla-version: ${{ env.scylla-version }}
ip-family: ${{ env.ip-family }}
raft-enabled: ${{ env.raft-enabled }}
tablets: ${{ env.tablets }}

- name: Run tests
run: make pkg-integration-test IP_FAMILY=${{ env.ip-family }} PKG=./pkg/service/restore RUN='"TestRestoreTables.*Integration"'

restore-schema:
name: Test restore schema
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Setup testing dependencies
uses: ./.github/actions/test-setup
with:
scylla-version: ${{ env.scylla-version }}
ip-family: ${{ env.ip-family }}
raft-enabled: ${{ env.raft-enabled }}
tablets: ${{ env.tablets }}

# Go does not support negative lookahead in regex expressions, so it has to be done manually.
# This regex ensures that all restore tests that didn't match restore-tables job will be run here.
- name: Run tests
run: make pkg-integration-test IP_FAMILY=${{ env.ip-family }} PKG=./pkg/service/restore RUN='"TestRestore([^T]|.{1}[^a]|.{2}[^b]|.{3}[^l]|.{4}[^e]|.{5}[^s]).*Integration"'

backup:
name: Test backup
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Setup testing dependencies
uses: ./.github/actions/test-setup
with:
scylla-version: ${{ env.scylla-version }}
ip-family: ${{ env.ip-family }}
raft-enabled: ${{ env.raft-enabled }}
tablets: ${{ env.tablets }}

- name: Run tests
run: make pkg-integration-test IP_FAMILY=${{ env.ip-family }} PKG=./pkg/service/backup

repair:
name: Test repair
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Setup testing dependencies
uses: ./.github/actions/test-setup
with:
scylla-version: ${{ env.scylla-version }}
ip-family: ${{ env.ip-family }}
raft-enabled: ${{ env.raft-enabled }}
tablets: ${{ env.tablets }}

- name: Run tests
run: make pkg-integration-test IP_FAMILY=${{ env.ip-family }} PKG=./pkg/service/repair

small-pkg:
name: Test other, smaller packages
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Set IP_FAMILY var for all tests
run: |
echo "IP_FAMILY=${{ env.ip-family }}" >> $GITHUB_ENV
- name: Setup testing dependencies
uses: ./.github/actions/test-setup
with:
scylla-version: ${{ env.scylla-version }}
ip-family: ${{ env.ip-family }}
raft-enabled: ${{ env.raft-enabled }}
tablets: ${{ env.tablets }}

- name: Run cqlping tests
run: make pkg-integration-test PKG=./pkg/ping/cqlping

- name: Run dynamoping tests
run: make pkg-integration-test PKG=./pkg/ping/dynamoping

- name: Run scyllaclient tests
run: make pkg-integration-test PKG=./pkg/scyllaclient

- name: Run cluster tests
run: make pkg-integration-test PKG=./pkg/service/cluster

- name: Run healthcheck tests
run: make pkg-integration-test PKG=./pkg/service/healthcheck

- name: Run scheduler tests
run: make pkg-integration-test PKG=./pkg/service/scheduler

- name: Run store tests
run: make pkg-integration-test PKG=./pkg/store

- name: Run migrate tests
run: make pkg-integration-test PKG=./pkg/schema/migrate

- name: Run netwait tests
run: make pkg-integration-test PKG=./pkg/util/netwait

0 comments on commit afe90d8

Please sign in to comment.