Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#768] improvement(CI): Avoiding related issues by changing CI pipeline dependencies #1500

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 0 additions & 97 deletions .github/workflows/integration-test.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/build.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,51 @@ jobs:
run: |
echo "Total coverage ${{ steps.jacoco.outputs.coverage-overall }}"
echo "Changed Files coverage ${{ steps.jacoco.outputs.coverage-changed-files }}"

test-amd64-arch:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
architecture: [linux/amd64]
java-version: [ 8, 11, 17 ]
test-mode: [ embedded, deploy ]
env:
DOCKER_RUN_NAME: hive-amd64
PLATFORM: ${{ matrix.architecture }}
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Package Gravitino
run: |
./gradlew build -x test -PjdkVersion=${{ matrix.java-version }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this step still required? As we've already build the project above.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the job name is 'Package Gravitino' and it is indeed a packaging task, the build task can be skipped and use compileDistribution directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

Copy link
Contributor Author

@qqqttt123 qqqttt123 Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried. But It will fail. I recover the command.

Copy link
Contributor

@yuqi1129 yuqi1129 Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I execute ./gradlew compileDistribution -x test locally without executing ./gradlew build, and it seems no error exists

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wander why ./gradlew compileDistribution -x test will trigger integration test...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wander why ./gradlew compileDistribution -x test will trigger integration test...

We have next steps. The step which you mentioned doesn't trigger.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have already built the Gravitino in line 85, I was thinking why can't we reuse the built package?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're different jobs. Different jobs may be scheduled to different machines.

./gradlew compileDistribution -x test -PjdkVersion=${{ matrix.java-version }}

- name: Setup debug Github Action
if: ${{ contains(github.event.pull_request.labels.*.name, 'debug action') }}
uses: csexton/debugger-action@master

- name: Integration Test
id: integrationTest
run: |
./gradlew test --rerun-tasks -PskipTests -PtestMode=${{ matrix.test-mode }} -PjdkVersion=${{ matrix.java-version }}

- name: Upload integrate tests reports
uses: actions/upload-artifact@v3
if: ${{ failure() && steps.integrationTest.outcome == 'failure' }}
with:
name: integrate test reports
path: |
build/reports
integration-test/build/integration-test.log
distribution/package/logs/gravitino-server.out
distribution/package/logs/gravitino-server.log
Loading