Skip to content

Commit

Permalink
refactor: build examples via makefile target
Browse files Browse the repository at this point in the history
  • Loading branch information
malandis committed Sep 16, 2024
1 parent 2750240 commit 05352b9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,17 @@ jobs:
distribution: 'corretto'

- name: Build examples
uses: gradle/gradle-build-action@v2
id: validation
continue-on-error: true
with:
build-root-directory: ./examples
arguments: clean build

- name: Send CI failure mail
if: ${{ steps.validation.outcome == 'failure' }}
uses: momentohq/standards-and-practices/github-actions/error-email-action@gh-actions-v1
with:
username: ${{secrets.MOMENTO_ROBOT_GMAIL_USERNAME}}
password: ${{secrets.MOMENTO_ROBOT_GMAIL_PASSWORD}}
run: make build-examples

# TODO: set up email secrets
# - name: Send CI failure mail
# if: ${{ steps.validation.outcome == 'failure' }}
# uses: momentohq/standards-and-practices/github-actions/error-email-action@gh-actions-v1
# with:
# username: ${{secrets.MOMENTO_ROBOT_GMAIL_USERNAME}}
# password: ${{secrets.MOMENTO_ROBOT_GMAIL_PASSWORD}}

- name: Flag Job Failure
if: ${{ steps.validation.outcome == 'failure' }}
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ clean:
build:
./gradlew assemble

## Build the examples
build-examples:
cd ./examples && ./gradlew assemble

## Run all the tests
test: test-momento test-redis

Expand Down

0 comments on commit 05352b9

Please sign in to comment.