Skip to content

Commit

Permalink
Create action to validate nuget package build in Lambda docker enviro…
Browse files Browse the repository at this point in the history
…nment
  • Loading branch information
brianfeucht committed Nov 20, 2023
1 parent 2d5cf7a commit b4ba5dc
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/sample-app-docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Validate Nuget Package Docker Build
on: [pull_request]

jobs:
build:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.x
cache: true
- run: dotnet tool install -g Amazon.Lambda.Tools
- name: Build and package lambda
working-directory: ./sample/SampleLambda
run: dotnet lambda package SampleLambda
- name: Run docker
run: docker run --rm -p 9000:8080 samplelambda:latest --detach
- name: Test function
run: curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}'

0 comments on commit b4ba5dc

Please sign in to comment.