chore: make template tests async and use editorconfig #988
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: .NET Testing | |
on: | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
test: | |
name: Execute Test ${{ matrix.project }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- project: KubeOps.KubernetesClient.Test | |
kubernetes: true | |
- project: KubeOps.Test | |
kubernetes: false | |
- project: KubeOps.Templates.Test | |
kubernetes: false | |
- project: KubeOps.TestOperator.Test | |
kubernetes: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.x | |
- name: Create Kubernetes Cluster | |
uses: helm/[email protected] | |
if: ${{ matrix.kubernetes == true }} | |
- name: Execute Tests | |
run: dotnet test --configuration Release tests/${{ matrix.project }} | |
result: | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
name: Final Results | |
needs: [test] | |
steps: | |
- run: | | |
result="${{ needs.test.result }}" | |
if [[ $result == "success" || $result == "skipped" ]]; then | |
exit 0 | |
else | |
exit 1 | |
fi |