Update Amazon.Lambda.Templates version for release #844
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: Source Generator CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- feature/annotations | |
pull_request: | |
jobs: | |
source-generator-build-pack-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET 3.1 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 3.1.x | |
- name: Setup .NET 6.0 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.0.x | |
- name: Setup .NET 8.0 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.100-rc.2.23502.2 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
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@v2 | |
with: | |
name: source-generator-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@v2 | |
with: | |
name: source-generator-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@v2 | |
- name: Setup .NET 6.0 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.0.x | |
- name: Setup .NET 8.0 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.100-rc.2.23502.2 | |
- 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@v2 | |
with: | |
name: test-app-build-result | |
path: Libraries/test/TestServerlessApp/bin/Debug/netcoreapp3.1 |