Merge pull request #673 from aws-powertools/develop #1171
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: Build .NET | |
on: | |
push: | |
branches: [develop, main] | |
pull_request: | |
branches: [develop, main] | |
defaults: | |
run: | |
working-directory: ./libraries | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Setup .NET 6.0 & 8.0 | |
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # 4.0.0 | |
with: | |
dotnet-version: | | |
6.0.405 | |
8.0.101 | |
- name: Build | |
run: dotnet build --configuration Release | |
- name: Test Examples | |
run: dotnet test ../examples/ | |
- name: Test & Code Coverage | |
run: dotnet test --collect:"XPlat Code Coverage" --results-directory ./codecov --verbosity normal | |
- name: Codecov | |
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # 4.5.0 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: unittests | |
fail_ci_if_error: false | |
name: codecov-lambda-powertools-dotnet | |
verbose: true | |
directory: ./libraries/codecov |