Skip to content

Commit

Permalink
refactor: moving out avro checks as a separate job (#289)
Browse files Browse the repository at this point in the history
* refactor: moving out avro checks as a seperate job

* reverting back to pull_request_target

* revert back space too

* adds caching layer for avroCompatibilityCheck
  • Loading branch information
kotharironak authored Nov 22, 2021
1 parent 85a92cc commit 431d690
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches:
- main
pull_request_target:
branches:
branches:
- main

jobs:
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Build with Gradle
uses: hypertrace/github-actions/gradle@main
with:
args: build dockerBuildImages
args: build -x avroCompatibilityCheck dockerBuildImages

validate-helm-charts:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -78,3 +78,31 @@ jobs:
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
GRADLE_OPTS: -Dorg.gradle.workers.max=1

validate-avros:
runs-on: ubuntu-20.04
steps:
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation
- name: Check out code
uses: actions/checkout@v2.3.4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
fetch-depth: 0

- name: create checksum file
uses: hypertrace/github-actions/checksum@main

- name: Cache packages
uses: actions/cache@v2
with:
path: ~/.gradle
key: gradle-packages-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/checksum.txt') }}
restore-keys: |
gradle-packages-${{ runner.os }}-${{ github.job }}
gradle-packages-${{ runner.os }}
- name: validate avros
uses: hypertrace/github-actions/gradle@main
with:
args: avroCompatibilityCheck

0 comments on commit 431d690

Please sign in to comment.