Skip to content

Commit

Permalink
Replace usage of custom gradle-command-action with `gradle-build-ac…
Browse files Browse the repository at this point in the history
…tion` (#29480)

* Replace usage of custom `gradle-command-action` with `gradle-build-action`

* Use `gradle-command-self-hosted-action` in Java Tests
  • Loading branch information
clayburn authored Dec 4, 2023
1 parent 70ef507 commit 367e4ec
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 32 deletions.
1 change: 0 additions & 1 deletion .github/actions/gradle-command-action
Submodule gradle-command-action deleted from 90ccf0
6 changes: 3 additions & 3 deletions .github/actions/gradle-command-self-hosted-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ runs:
- name: Run Gradle Command
shell: bash
run: |
# Removing settings.xml is a workaround to avoid a decryption issue
# of Beam's gradle-command-action plugin and github's provided
# maven settings.xml file
# This step is a workaround to avoid a decryption issue of Beam's
# net.linguica.gradle.maven.settings plugin and github's provided maven
# settings.xml file
if [ -f ~/.m2/settings.xml ]; then
rm ~/.m2/settings.xml
fi
Expand Down
40 changes: 15 additions & 25 deletions .github/workflows/java_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,12 @@ jobs:
with:
java-version: 8
go-version: 1.21
- name: Remove default github maven configuration
# This step is a workaround to avoid a decryption issue of Beam's
# net.linguica.gradle.maven.settings plugin and github's provided maven
# settings.xml file
run: rm ~/.m2/settings.xml
# :sdks:java:core:test
- name: Run :sdks:java:core:test
uses: ./.github/actions/gradle-command-action
uses: ./.github/actions/gradle-command-self-hosted-action
with:
arguments: -p sdks/java/core/ test
gradle-command: test
arguments: -p sdks/java/core/
- name: Upload test logs for :sdks:java:core:test
uses: actions/upload-artifact@v3
if: always()
Expand All @@ -100,9 +96,10 @@ jobs:
path: sdks/java/core/build/reports/tests/test
# :sdks:java:harness:test
- name: Run :sdks:java:harness:test
uses: ./.github/actions/gradle-command-action
uses: ./.github/actions/gradle-command-self-hosted-action
with:
arguments: -p sdks/java/harness/ test
gradle-command: test
arguments: -p sdks/java/harness/
if: always()
- name: Upload test logs for :sdks:java:harness:test
uses: actions/upload-artifact@v3
Expand All @@ -112,9 +109,10 @@ jobs:
path: sdks/java/harness/build/reports/tests/test
# :runners:core-java:test
- name: Run :runners:core-java:test
uses: ./.github/actions/gradle-command-action
uses: ./.github/actions/gradle-command-self-hosted-action
with:
arguments: -p runners/core-java/ test
gradle-command: test
arguments: -p runners/core-java/
if: always()
- name: Upload test logs for :runners:core-java:test
uses: actions/upload-artifact@v3
Expand All @@ -141,15 +139,11 @@ jobs:
with:
java-version: 8
go-version: 1.21
- name: Remove default github maven configuration
# This step is a workaround to avoid a decryption issue of Beam's
# net.linguica.gradle.maven.settings plugin and github's provided maven
# settings.xml file
run: rm ~/.m2/settings.xml
- name: Run WordCount Unix
uses: ./.github/actions/gradle-command-action
uses: ./.github/actions/gradle-command-self-hosted-action
with:
arguments: -p examples/ integrationTest --tests org.apache.beam.examples.WordCountIT
gradle-command: integrationTest
arguments: -p examples/ --tests org.apache.beam.examples.WordCountIT
-DintegrationTestRunner=direct
-DintegrationTestPipelineOptions=["--runner=DirectRunner","--tempRoot=./tmp"]
- name: Upload test logs
Expand Down Expand Up @@ -191,15 +185,11 @@ jobs:
service_account_key: ${{ secrets.GCP_SA_KEY }}
project_id: ${{ secrets.GCP_PROJECT_ID }}
export_default_credentials: true
- name: Remove default github maven configuration
# This step is a workaround to avoid a decryption issue of Beam's
# gradle-command-action plugin and github's provided maven
# settings.xml file
run: rm ~/.m2/settings.xml
- name: Run WordCount
uses: ./.github/actions/gradle-command-action
uses: ./.github/actions/gradle-command-self-hosted-action
with:
arguments: -p examples/ integrationTest --tests org.apache.beam.examples.WordCountIT
gradle-command: integrationTest
arguments: -p examples/ --tests org.apache.beam.examples.WordCountIT
-DintegrationTestPipelineOptions=["--runner=DataflowRunner","--project=${{ secrets.GCP_PROJECT_ID }}","--tempRoot=gs://${{ secrets.GCP_TESTING_BUCKET }}/tmp/"]
-DintegrationTestRunner=dataflow
- name: Upload test logs
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@
[submodule ".github/actions/github-push-action"]
path = .github/actions/github-push-action
url = https://github.com/ad-m/github-push-action
[submodule ".github/actions/gradle-command-action"]
path = .github/actions/gradle-command-action
url = https://github.com/eskatos/gradle-command-action

0 comments on commit 367e4ec

Please sign in to comment.