Skip to content

Commit

Permalink
feat: copy dotnet examples from examples repo (#148)
Browse files Browse the repository at this point in the history
* feat: copy dotnet examples from examples repo

We are in the process of moving the examples out of the old
examples repo and into the individual SDK repos.  This commit
copies the dotnet examples over; no changes.

Also copies over Pete's dependabot/examples CI work.
  • Loading branch information
cprice404 authored Sep 14, 2022
1 parent d7a3c6d commit 9794827
Show file tree
Hide file tree
Showing 12 changed files with 772 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "nuget" # See documentation for possible values
directory: "/examples" # Location of package manifests
schedule:
interval: "daily"
allow:
- dependency-name: "Momento.Sdk"
38 changes: 38 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,41 @@ jobs:
run: |
dotnet test tests/Integration/Momento.Sdk.Incubating.Tests
shell: bash

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 samples
id: validation
continue-on-error: true
run: |
pushd dotnet/MomentoExamples
dotnet build MomentoApplication
dotnet run --project MomentoApplication
dotnet build MomentoApplicationPresignedUrl
popd
shell: bash

- name: Send CI failure mail
if: ${{ steps.validation.outcome == 'failure' }}
uses: ./.github/actions/error-email-action
with:
username: ${{secrets.MAIL_USERNAME}}
password: ${{secrets.MAIL_PASSWORD}}

- name: Flag Job Failure
if: ${{ steps.validation.outcome == 'failure' }}
run: exit 1
Loading

0 comments on commit 9794827

Please sign in to comment.