Update api_deploy.yml #83
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
# This workflow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: Build and run Unit Tests | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore AirSnitch.API dependencies | |
run: | | |
cd src/AirSnitch.API | |
dotnet restore | |
- name: Build AirSnitch.API | |
run: | | |
cd src/AirSnitch.API | |
dotnet build --no-restore | |
- name: Restore AirSnitch.Worker dependencies | |
run: | | |
cd src/AirSnitch.Worker | |
dotnet nuget add source --username [ArturLavrov] --password ${{ secrets.NUGET_REGISTRY_API_KEY }} --name github https://nuget.pkg.github.com/AirQualityControl/index.json --store-password-in-clear-text | |
dotnet restore | |
- name: Build AirSnitch.Worker | |
run: | | |
cd src/AirSnitch.Worker | |
dotnet build --no-restore | |
- name: Run Unit Tests | |
run: | | |
cd test/unit/AirSnitch.UnitTests | |
dotnet test --no-build --verbosity normal |