From 05352b9890b43678ea4796e7b7897e605e86f507 Mon Sep 17 00:00:00 2001 From: Michael Landis Date: Mon, 16 Sep 2024 16:39:40 -0700 Subject: [PATCH] refactor: build examples via makefile target --- .github/workflows/on-pull-request.yml | 20 +++++++++----------- Makefile | 4 ++++ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/on-pull-request.yml b/.github/workflows/on-pull-request.yml index 812ba67..2de0b14 100644 --- a/.github/workflows/on-pull-request.yml +++ b/.github/workflows/on-pull-request.yml @@ -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' }} diff --git a/Makefile b/Makefile index 508c6fc..4260638 100644 --- a/Makefile +++ b/Makefile @@ -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