Handle when Lambda events are sent unix epoch dates in milliseconds #925
Workflow file for this run
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
name: Lambda Annotations CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- dev | |
pull_request: | |
jobs: | |
lambda-annotations-build-pack-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET 3.1 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 3.1.x | |
- name: Setup .NET 6.0 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6.0.x | |
- name: Setup .NET 8.0 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@8c3f20df09ac63af7b3ae3d7c91f105f857d8497 #v4 | |
with: | |
aws-access-key-id: ${{ secrets.CI_AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.CI_AWS_ACCESS_KEY_SECRET }} | |
aws-region: us-west-2 | |
role-to-assume: ${{ secrets.CI_TEST_RUNNER_ROLE }} | |
role-duration-seconds: 3600 | |
role-session-name: test-runner | |
role-skip-session-tagging: true | |
- name: Restore dependencies | |
run: | | |
dotnet restore Libraries/src/Amazon.Lambda.Annotations/Amazon.Lambda.Annotations.csproj | |
dotnet restore Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Amazon.Lambda.Annotations.SourceGenerators.Tests.csproj | |
dotnet restore Libraries/test/TestServerlessApp.IntegrationTests/TestServerlessApp.IntegrationTests.csproj | |
- name: Build | |
run: | | |
dotnet build Libraries/src/Amazon.Lambda.Annotations/Amazon.Lambda.Annotations.csproj --no-restore --configuration Release | |
dotnet build Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Amazon.Lambda.Annotations.SourceGenerators.Tests.csproj --no-restore --configuration Release | |
dotnet build Libraries/test/TestServerlessApp.IntegrationTests/TestServerlessApp.IntegrationTests.csproj --no-restore --configuration Release | |
- name: Pack | |
run: dotnet pack Libraries/src/Amazon.Lambda.Annotations/Amazon.Lambda.Annotations.csproj -p:NuspecFile=../Amazon.Lambda.Annotations.nuspec --no-build --configuration Release --output "PackResults" | |
- name: Upload pack results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: lambda-annotations-nuget-package | |
path: PackResults | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} | |
- name: Test | |
run: | | |
dotnet test Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Amazon.Lambda.Annotations.SourceGenerators.Tests.csproj --no-build --configuration Release --verbosity normal --logger trx --results-directory "TestResults" | |
dotnet test Libraries/test/TestServerlessApp.IntegrationTests/TestServerlessApp.IntegrationTests.csproj --no-build --configuration Release --verbosity normal --logger trx --results-directory "TestResults" | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: lambda-annotations-test-result | |
path: TestResults | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} | |
test-app-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET 6.0 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6.0.x | |
- name: Setup .NET 8.0 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore Libraries/test/TestServerlessApp/TestServerlessApp.csproj | |
- name: Build | |
run: dotnet build Libraries/test/TestServerlessApp/TestServerlessApp.csproj --no-restore --configuration Release --verbosity detailed | |
- name: Upload built assemblies | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-app-build-result | |
path: Libraries/test/TestServerlessApp/bin/Release/net6.0 |