-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create action to validate nuget package build in Lambda docker enviro…
…nment
- Loading branch information
1 parent
2d5cf7a
commit b4ba5dc
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 '{}' |