Skip to content
Merged
44 changes: 44 additions & 0 deletions .github/workflows/build-run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Gradle Build and Run Tests

on:
workflow_call: # Allow to be run by other workflows

jobs:
build-and-run-tests:
name: Build and Run Tests
runs-on: ubuntu-latest
steps:
- name: Checkout project sources
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v1
with:
distribution: 'microsoft'
java-version: '17'

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

- name: Build with Gradle
run: ./gradlew clean build

- name: Start Docker Containers
run: docker compose -f infra/recipes/docker-compose/oh-only/docker-compose.yml up -d --build

- name: Wait for Docker Containers to start
run: sleep 30

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install dependencies
run: pip install -r scripts/python/requirements.txt

- name: Run Integration Tests
run: python scripts/python/integration_test.py ./tables-test-fixtures/tables-test-fixtures-iceberg-1.2/src/main/resources/dummy.token

- name: Stop Docker Containers
run: docker compose -f infra/recipes/docker-compose/oh-only/docker-compose.yml down
40 changes: 4 additions & 36 deletions .github/workflows/build-tag-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,20 @@ on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]

jobs:
build-gradle-project:
build-and-run-tests:
uses: ./.github/workflows/build-run-tests.yml

tag-publish-gradle:
name: Build tagged commit
runs-on: ubuntu-latest
steps:
- name: Checkout project sources
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: 0

- name: Set up JDK 17
uses: actions/setup-java@v1
with:
distribution: 'microsoft'
java-version: '17'

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

- name: Build with Gradle
run: ./gradlew clean build

- name: Start Docker Containers
run: docker compose -f infra/recipes/docker-compose/oh-only/docker-compose.yml up -d --build

- name: Wait for Docker Containers to start
run: sleep 30

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install dependencies
run: pip install -r scripts/python/requirements.txt

- name: Run Integration Tests
run: python scripts/python/integration_test.py ./tables-test-fixtures/tables-test-fixtures-iceberg-1.2/src/main/resources/dummy.token

- name: Stop Docker Containers
run: docker compose -f infra/recipes/docker-compose/oh-only/docker-compose.yml down

- name: Bump version and push tag
if: ${{ success() && github.ref == 'refs/heads/main' && github.repository == 'linkedin/openhouse' }}
uses: anothrNick/github-tag-action@1.69.0
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/pr-validations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Pull Request Validations

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

concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build-run-tests:
uses: ./.github/workflows/build-run-tests.yml
Loading