Skip to content

Run tests automatically #1689

Run tests automatically

Run tests automatically #1689

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/[email protected]
with:
creds: ${{ secrets.SP_CREDS }}
- name: HashiCorp - Setup Terraform
uses: hashicorp/[email protected]
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"