ci-dotnet #919
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: ci-dotnet | |
on: | |
push: | |
branches: | |
- '**' | |
paths: | |
- '.github/workflows/ci-function.yml' | |
- 'functions/**' | |
pull_request: | |
branches: [ main ] | |
paths-ignore: | |
- '**/README.md' | |
- '**/LICENSE' | |
- 'visuals/**' | |
schedule: | |
- cron: '0 2 * * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
env: | |
AZURE_FUNCTIONAPP_PACKAGE_PATH: './functions' | |
DOTNET_VERSION: '6.0.x' | |
jobs: | |
dotnet: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: Restore dependencies | |
run: | | |
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}' | |
dotnet restore | |
popd | |
- name: Build | |
run: | | |
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}' | |
dotnet build --no-restore --output ./bin/publish | |
popd | |
- name: Test | |
run: | | |
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}' | |
dotnet test --no-build --verbosity normal | |
popd |