Feature/integracion time controller #119
Workflow file for this run
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: .NET | |
on: | |
workflow_call: | |
pull_request: | |
push: | |
branches: [ "develop" ] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Check for Secrets.cs file and create if it does not exist | |
# as it is ignored by default for security reasons | |
- name: Create Secrets.cs if not exists | |
run: | | |
$path = "./TemperatureWarriorCode/Secrets.cs" | |
if (-Not (Test-Path $path)) { | |
New-Item -ItemType File -Path $path -Force | |
} | |
Add-Content $path 'namespace TemperatureWarriorCode {' | |
Add-Content $path ' internal class Secrets {' | |
Add-Content $path ' // WiFi name' | |
Add-Content $path ' public const string WIFI_NAME = "name";' | |
Add-Content $path ' // WiFi password' | |
Add-Content $path ' public const string WIFI_PASSWORD = "password";' | |
Add-Content $path ' }' | |
Add-Content $path '}' | |
shell: pwsh | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
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 |