Skip to content

Commit

Permalink
Add PR tests to github actions (apache#5)
Browse files Browse the repository at this point in the history
* Add PR tests to github actions

* Rename publish action
  • Loading branch information
dxichen authored Aug 17, 2021
1 parent 6833058 commit 3dd3f06
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/li_maven_publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle

name: Gradle Package
name: LI JFrog Artifactory Publish

on:
release:
Expand All @@ -20,20 +20,17 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '11'
java-version: '8'
distribution: 'adopt'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Validate Samza runner
run: ./gradlew :runners:samza:build :runners:samza:validatesRunner :runners:samza:job-server:validatesPortableRunner

# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
# the publishing section of your build.gradle
- name: Publish to GitHub Packages
- name: Publish to LI JFrog Artifactory
run: ./gradlew publishMavenJavaPublicationToLinkedin.jfrog.httpsRepository -PnoSigning -PisRelease -PisLinkedin --no-daemon
env:
USERNAME: ${{ secrets.ARTIFACTORY_USER }}
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/li_runners_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle

name: LI Runners Test

on:
pull_request:
branches: ['li_trunk']
paths: ['runners/samza/**', 'runners/spark/**', 'buildSrc/src/main/groovy/org/apache/beam/gradle/**']

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'

- name: Validate Samza runner
run: ./gradlew :runners:samza:build :runners:samza:validatesRunner :runners:samza:job-server:validatesPortableRunner

- name: Validate Spark runner
run: ./gradlew :runners:spark:build :runners:spark:validatesRunner

0 comments on commit 3dd3f06

Please sign in to comment.