Skip to content

feat: add topics

feat: add topics #333

Workflow file for this run

name: On pull request
on:
pull_request:
branches: [main]
jobs:
build_csharp:
strategy:
matrix:
include:
- os: ubuntu-latest
target-framework: net6.0
- os: windows-latest
target-framework: net461
runs-on: ${{ matrix.os }}
env:
TEST_AUTH_TOKEN: ${{ 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: dotnet build
- name: Unit Test
run: dotnet test -f ${{ matrix.target-framework }} tests/Unit/Momento.Sdk.Tests
- name: Integration Test
run: dotnet test -f ${{ matrix.target-framework }} tests/Integration/Momento.Sdk.Tests
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_AUTH_TOKEN: ${{ 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 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-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