Run tests automatically #1751
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: Run tests automatically | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: 0 12 * * * | |
- cron: 0 0 * * * | |
env: | |
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }} | |
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }} | |
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }} | |
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }} | |
jobs: | |
buildAndTest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Azure Login | |
uses: Azure/login@v2.1.0 | |
with: | |
creds: ${{ secrets.SP_CREDS }} | |
- name: HashiCorp - Setup Terraform | |
uses: hashicorp/setup-terraform@v2.0.3 | |
with: | |
terraform_wrapper: false | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore | |
- name: Test | |
run: dotnet test --no-build --verbosity normal --logger "trx;logfilename=testResults.trx" | |
- name: Publish Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
if: always() | |
with: | |
trx_files: "**/*.trx" |