From bc770f1dc26f62cf3f2cd8e22b78ceec49196185 Mon Sep 17 00:00:00 2001 From: Vaibhav Kushwaha Date: Tue, 10 Sep 2024 14:41:49 +0530 Subject: [PATCH] added workflow file --- .github/workflows/basic-test-workflow.yml | 47 +++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/basic-test-workflow.yml diff --git a/.github/workflows/basic-test-workflow.yml b/.github/workflows/basic-test-workflow.yml new file mode 100644 index 00000000..33dad427 --- /dev/null +++ b/.github/workflows/basic-test-workflow.yml @@ -0,0 +1,47 @@ +name: Sanity test with YugabyteDB build + +on: + workflow_dispatch: + inputs: + yb_version: + description: "YugabyteDB version to run tests against (build should be present in internal Quay registry)" + required: false + type: string + push: + branches: + - main + pull_request: + branches: + - main + +env: + YB_DOCKER_IMAGE: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.yb_version != '' && github.event.inputs.yb_version || secrets.YB_DOCKER_IMAGE }} + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Login to Quay.io + uses: docker/login-action@v2 + with: + registry: quay.io + username: ${{ secrets.QUAY_BOT_USERNAME }} + password: ${{ secrets.QUAY_BOT_TOKEN }} + - name: Pull docker image + run: docker pull $YB_DOCKER_IMAGE + - name: YugabyteDBDatatypesTest + run: mvn clean test -Dtest=YugabyteDBDatatypesTest + - name: YugabyteDBTabletSplitTest + run: mvn clean test -Dtest=YugabyteDBTabletSplitTest + - name: YugabyteDBEnumValuesTest + run: mvn clean test -Dtest=YugabyteDBEnumValuesTest + - name: YugabyteDBSnapshotTest + run: mvn clean test -Dtest=YugabyteDBSnapshotTest