Skip to content

Update version info. #449

Update version info.

Update version info. #449

Workflow file for this run

name: .NET
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
dotnet-format:
runs-on: windows-latest
steps:
- name: 🤘 checkout
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: ⚙ dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Workaround
#https://github.com/dotnet/format/issues/1433#issuecomment-1055920818
run: dotnet tool install -g dotnet-format --version "6.*" --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json
- name: ✓ ensure format UA-CloudLibrary Server
working-directory: UACloudLibraryServer
run: dotnet-format --verify-no-changes -v:diag --exclude ~/.nuget
- name: ✓ ensure format UA-CloudLibrary .NET Client
working-directory: Opc.Ua.CloudLib.Client
run: dotnet-format --verify-no-changes -v:diag --exclude ~/.nuget
- name: ✓ ensure format UA-CloudLibrary SampleConsoleClient
working-directory: SampleConsoleClient
run: dotnet-format --verify-no-changes -v:diag --exclude ~/.nuget
build:
runs-on: ubuntu-latest
steps:
- name: Start PostgreSQL on Ubuntu
run: |
sudo systemctl start postgresql.service
pg_isready
- name: Create additional user
run: |
sudo -u postgres psql --command="CREATE USER testuser SUPERUSER PASSWORD 'password'" --command="\du"
- name: Create test database with proper collation
run: |
sudo -u postgres psql --command="create database cloudlib_test with LC_COLLATE = 'en_US.UTF8' LC_CTYPE = 'en_US.UTF8' TEMPLATE template0"
- name: List existing databases
run: |
sudo -u postgres psql -l --command="\du"
- name: 🤘 checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: ⚙ dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Restore dependencies UA-CloudLibrary
working-directory: UACloudLibraryServer
run: dotnet restore
- name: Restore dependencies UA-CloudLibrary .NET Client
run: dotnet restore
working-directory: Opc.Ua.CloudLib.Client
- name: Restore dependencies SampleConsoleClient
run: dotnet restore
working-directory: SampleConsoleClient
- name: Restore dependencies CloudLibClientTests
run: dotnet restore
working-directory: Tests/CloudLibClientTests
- name: Restore dependencies CloudLibSync
working-directory: CloudLibSync
run: dotnet restore
- name: Restore dependencies CloudLibSyncAzureFunction
working-directory: CloudLibSyncAzureFunction
run: dotnet restore
- name: Build
run: dotnet build UA-CloudLibrary.sln --configuration Release --no-restore
- name: Test
run: dotnet test UA-CloudLibrary.sln --no-build --configuration Release --verbosity normal -l:"console;verbosity=normal"
- name: List databases after test run
run: |
sudo -u postgres psql -l --command="\du"
- name: pack NuGet
run: dotnet pack Opc.Ua.CloudLib.Client/Opc.Ua.Cloud.Library.Client.csproj --configuration Release
- name: add github nuget-feed#
if: ${{ github.event_name != 'pull_request' }} # Will only push nuget, when not in pull_request
run: dotnet nuget add source --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
- name: publish NuGet
if: ${{ github.event_name != 'pull_request' }} # Will only push nuget, when not in pull_request
run: dotnet nuget push "Opc.Ua.CloudLib.Client/bin/Release/*.nupkg" --source "github"
- name: publish NuGet Symbols
if: ${{ github.event_name != 'pull_request' }} # Will only push nuget, when not in pull_request
run: dotnet nuget push "Opc.Ua.CloudLib.Client/bin/Release/*.snupkg" --source "github"