Skip to content

Commit

Permalink
Separate PR workflow from workflows running on main for better separa…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
Will-Lo committed Dec 11, 2024
1 parent cea8b28 commit b064b71
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build-tag-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]

jobs:
build-gradle-project:
Expand All @@ -15,6 +13,7 @@ jobs:
- 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
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/build-test-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Gradle Build and Test Pull Requests to OpenHouse

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
build-gradle-project:
name: Build Latest commit
runs-on: ubuntu-latest
steps:
- name: Checkout project sources using merge commit hash
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

0 comments on commit b064b71

Please sign in to comment.