Skip to content

feat: Add the read concern header #581

feat: Add the read concern header

feat: Add the read concern header #581

Workflow file for this run

name: On pull request
on:
pull_request:
branches: [main]
jobs:
build_csharp:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
grpc-web: [false, true]
runs-on: ${{ matrix.os }}
env:
MOMENTO_API_KEY: ${{ secrets.ALPHA_TEST_AUTH_TOKEN }}
steps:
- name: Get current time
uses: gerred/actions/current-time@master
id: current-time
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0.x"
- name: Verify README generation
uses: momentohq/standards-and-practices/github-actions/oss-readme-template@gh-actions-v2
with:
project_status: official
project_stability: stable
project_type: sdk
sdk_language: .NET
template_file: ./README.template.md
output_file: ./README.md
dev_docs_slug: dotnet
- 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 }}
- name: Build
run: make GRPC_WEB=${{ matrix.grpc-web }} build
- name: Test
run: make prod-test
build_examples:
runs-on: ubuntu-latest
env:
# TODO: remove token stored as secret in favor of using a
# momento-local instance that can be spun up for testing
MOMENTO_API_KEY: ${{ secrets.ALPHA_TEST_AUTH_TOKEN }}
steps:
- name: Setup repo
uses: actions/checkout@v2
- name: Set up dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0.x"
- name: Run MomentoApplication example
id: validation-momentoapplication
continue-on-error: true
working-directory: ./examples/MomentoApplication
run: dotnet run
- name: Run MomentoWeb example
id: validation-momento-web
continue-on-error: true
working-directory: ./examples/MomentoWeb
run: dotnet run
- name: Run doc API snippets
id: validation-docexampleapis
continue-on-error: true
working-directory: ./examples/DocExampleApis
run: dotnet run
- name: Test example failure
id: test-example-failure
run: |
if [[ "${{ steps.validation-momentoapplication.outcome }}" == "failure" || "${{ steps.validation-momento-web.outcome }}" == "failure" || "${{ steps.validation-docexampleapis.outcome }}" == "failure" ]]
then
echo "failure=true" >> $GITHUB_OUTPUT
else
echo "failure=false" >> $GITHUB_OUTPUT
fi
- name: Send CI failure mail
if: ${{ steps.test-example-failure.outputs.failure == 'true' }}
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.test-example-failure.outputs.failure == 'true' }}
run: exit 1