Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Amit-Singh40 <[email protected]>
  • Loading branch information
Amit-Singh40 committed Feb 9, 2024
1 parent 05271b9 commit 946ab63
Showing 1 changed file with 16 additions and 21 deletions.
37 changes: 16 additions & 21 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,40 +48,35 @@ env:
REPORTS_LOCATIONS: |
pravega-sensor-collector/build/reports
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Build Information
run: echo Building a '${{ github.event_name }}' for target '${{ github.ref }}'.
- name: Checkout
uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v2
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11' # major or semver Java version will be acceptable, see https://github.com/marketplace/actions/setup-java-jdk#basic
distribution: 'temurin'
java-version: '11'
- name: Test script
run: ./scripts/build-installer.sh
- name: Clean
if: ${{ startsWith(github.ref, 'refs/heads/') }}
run: ./gradlew clean ${{env.GRADLE_OPTS}}
- name: Compile & Checkstyle
run: ./gradlew jar compileTest checkstyleMain checkstyleTest --parallel ${{env.GRADLE_OPTS}}
- name: Build
run: ./scripts/build-installer.sh

- name: Set env
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Release
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Tar Reports
run: tar --use-compress-program zstd -cf reports-${{github.job}}.tzst `echo ${{env.REPORTS_LOCATIONS}}`
- name: Upload Reports
uses: actions/upload-artifact@v2
with:
files: ./pravega-sensor-collector/build/distributions/pravega-sensor-collector-*.tgz
draft: true
name: pravega-sensor-collector ${{ env.RELEASE_VERSION }}
name: ${{github.job}}-reports
retention-days: 4
path: reports-${{github.job}}.tzst
# Uncomment these two lines if you need ssh access to debug a build.
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1
Expand All @@ -99,7 +94,7 @@ jobs:
distribution: 'temurin'
java-version: '11'
- name: Unit tests
run: ./gradlew test --parallel ${{env.GRADLE_OPTS}}
run: ./gradlew build --parallel ${{env.GRADLE_OPTS}}
- name: PWD
run: pwd
- name: LS
Expand Down

0 comments on commit 946ab63

Please sign in to comment.