Skip to content

chore: add examples #39

chore: add examples

chore: add examples #39

Workflow file for this run

name: On pull request
on:
pull_request:
branches: [ main ]
jobs:
verify:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'corretto'
- name: Commitlint and Other Shared Build Steps
uses: momentohq/standards-and-practices/github-actions/shared-build@gh-actions-v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test:
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379
env:
MOMENTO_API_KEY: ${{ secrets.ALPHA_TEST_AUTH_TOKEN }}
steps:
- name: Checkout project
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'corretto'
- name: Build project
run: make build
- name: Run tests vs momento
run: make test-momento
- name: Run tests vs redis
run: make test-redis
build-examples:
runs-on: ubuntu-latest
env:
MOMENTO_API_KEY: ${{ secrets.ALPHA_TEST_AUTH_TOKEN }}
steps:
- name: Checkout project
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'corretto'
- name: Build examples
id: validation
continue-on-error: true
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' }}
run: exit 1