Skip to content

Update api_deploy.yml #83

Update api_deploy.yml

Update api_deploy.yml #83

# 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